Reputation: 17
My form contains 7 tabs. I want to get 3rd tab as default tab in my application whenever user enter in my application then user will get window with 3rd tab.
Upvotes: 1
Views: 2474
Reputation: 1098
Have a look here.
In particular, you want to employ this on your JTabbedPane:
yourtabbedPane.setSelectedIndex(yourdesiredindex);
This explains how to set the current tab in JTabbedPane. You want to put this code in the most appropriate event-handler.
Upvotes: 4