I have created a java application which has a JTabbedPane that contains three JPanels. In my first panel I have a button. When the user clicks the button, it should open/show the second panel. Can anyone tell me how I can do that?
Asked
Active
Viewed 725 times
1 Answers
1
Simply use the method setSelectedIndex
myTabbedPane.setSelectedIndex(1);

mort
- 12,988
- 14
- 52
- 97
-
Yes I did. You know, I have to wait 5minutes before accepting the answer. Anyways Thanks man. – Sas Nov 27 '11 at 20:17