I have an swing application with a JTabbedPanecontaining some JPannels (tabs).I have a Button in tab1(say). I coded the Button action in such a way that it generates a new tab say tab2 which contains some components inside it but the thing is when a user clicks on tab2 user is able to see the components in Tab2
My Question is instead of user activity of clicking on tab2 is it possible to load and display tab2 components automatically and show it to user. What i mean to say is Bring it to front
Click on the link that is automatically created for JTabbedPane. Scroll down to the method list. Read through them and see if one does what you want. I'll tell you two things:
1) there is at lease one such a method
2) it starts with set
Edit: Maneesh beat me to it. However, you can use the above steps to find a lot more useful methods, for all classes.