aspose file tools
The moose likes Swing / AWT / SWT and the fly likes change the focus to the new tab Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "change the focus to the new tab" Watch "change the focus to the new tab" New topic
Author

change the focus to the new tab

chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 197
Hi,

When I am add new tab to JTabbedPane the focus is not change
How can I change the focus to the new tab ?

Thanks

Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19553
    
  10

I just had a quick look at the API documentation and I see there's a setSelectedComponent method and a setSelectedIndex method.
chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 197
thanks
 
Don't get me started about those stupid light bulbs.
 
subject: change the focus to the new tab