Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTabbedPane  RSS feed

 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I was wondering if someone could help me. I have a JTabbedPane (Pane A), that has another JTabbedPane (Pane B) within it. How can I determine whether or not a user has clicked a tab on Pane B? Can I use ActionListener, or do I need to use something else like ChangeListener? If so, how do I use it? I just can't seem to figure it out.
Thanks in advance! I really appreciate it!
 
Lon Allen
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a changeListener on each JTabbedPane. Your class needs to "implements" ChangeLister and you will need a "void stateChanged(ChangeEvent ce)" method in the class:

[ August 22, 2002: Message edited by: Lon Allen ]
[ August 22, 2002: Message edited by: Lon Allen ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!