The following code returns me an error saying: \"constructor call must be the first statment in a constructor.\"
I dont get it. The constructor in my c
The constructors name must be the same as the class name. Let's look at this:
constructor call must be the first statement in a constructor
The constructor word in constructor call
references the super class's constructor which is the super();
The constructor word in in a constructor
refers to your class's consucor that is : public labelsAndIcons()
so you need to narrow your code to this:
public class labelsAndIcons extends JFrame
{
public labelsAndIcons ()
{
super( "Testing JLabel" );
}
}