A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Swing / AWT / SWT
Author
change the focus to the new tab
chen young
Ranch Hand
Joined: Sep 09, 2005
Posts: 177
posted
Jun 09, 2009 08:26:54
0
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
Bartender
Joined: Oct 14, 2005
Posts: 16483
2
I like...
posted
Jun 09, 2009 10:02:04
0
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: 177
posted
Jun 10, 2009 01:26:35
0
thanks
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: change the focus to the new tab
Similar Threads
Focus traversal problem in JTable
Tabbing Out Of JEditorPane...
Tab question
JTable and tab - last fix before release! Yay!!
swing(JComboBox)urgent
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter