I’ll let the code and errors do the talk, because I really think they say everything except THIS SHOULDN’T BE HAPPENING! Does anyone know how to make this compile?
Code
class CountDownTimerGUI extends BHTimerGUI
{
private TimerJPanel control;
private TimerDisplayJPanel disp;
public CountDownTimerGUI(TimerJPanel control, TimerDisplayJPanel disp)
>> {
this.control = control;
this.disp = disp;
}
}
(>>signifies the line of the error)
this overrides the constructor for BHTimerGUI, who’s constructor is as follows:
public BHTimerGUI(TimerJPanel control, TimerDisplayJPanel disp)
{
this.control = control;
this.disp = disp;
}
Compiler Error
I:\Java\NetBeansProjects\Blue Husky's Timer 2.0.0\src\bhtimer\GUI.java:145: cannot find symbol
symbol : constructor BHTimerGUI()
location: class bhtimer.BHTimerGUI
{
NetBeans shows a popup with the following text:
constructor BHTimerGUI in class bhtimer.BHTimerGUI cannot be applied to given types;
required: bhtimer.TimerJPanel,bhtimer.TimerDisplayJPanel
found: no arguments
reason: actual and formal argument lists differ in length
Yes, this SHOULD be happening! you are not initializing the superclass constructor.
Try with this constructor: