So I have a class called MyFrame that extends JFrame. I have added an object of another class named TabbedFrame as a component to MyFrame Class in MyFrame's constructor like
add(new TabbedFrame());
setTitle("Some Title");
setVisible(true);
Now the class TabbedFrame extends another class called FrameDemo in which the frame title is defined as :
super ("Title One");
When I run it, I get Title One as my JFrame's title. But I think it should be Some Title since I've changed it in MyClass's constructor. Here's what the code is so far. Any help would be highly appreciated. Thanks.
public class MyFrame extends JFrame{
public MyFrame(){
add(new TabbedFrame());
setTitle("Some Title");
setVisible(true);
}
public static void main(String[] args){
MyFrame frame = new MyFrame();
}
}