Hi ,
In my project I have created many forms like candiateInfo,Resume etc.(which extends JFrame)
Now I want to use JTabbedPane.Menas if I click on one tab it should take user to resp. form.Code I have written like this(it's in contstructor of that class):
[code]{ contentPane = (JPanel) this.getContentPane();
contentPane.setLayout(borderLayout1);
JTabbedPane tabbedPane = new JTabbedPane();
String tabs[] = {"CandidateInfo", "Resume"};
tabbedPane.addTab(tabs[0], new Candidate());
tabbedPane.addTab(tabs[1], new Resume());
tabbedPane.setSelectedIndex(0);
add(tabbedPane, BorderLayout.CENTER);
this.setSize(new Dimension(400, 300));
this.setTitle("Frame Title");
}
****It's giving runtime error- IllegalArgumentException:a window added to a conatainer.Can anybody explain me why it's giving this error.
Thanks in advance
Anagha
------------------