Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTabbedPane  RSS feed

 
Sam Zheng
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a group of components on a JTabbedPane. When the user clicks any one of the components, I want to perform certain data validation before displaying the new component on the JTabbedPane. Is there any listener that I can add to the JTabbedPane for me to accomplish this? Thanks for help!
Sam
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sam,
I'm not sure if I am correctly interpreting your question, but the JTabbedPane has the "addChangeListener()" method. The ChangeListener that you add, gets notified whenever you change the active tab of the "JTabbedPane".
Hope this helps.
Good Luck,
Avi.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!