• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to load tab content upon clicking the tab in JTabbedPane?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Could you please help me in this?

Requirement:
I would like to load content of a tab once after user clicks on particular tab in JTabbedPan. (Based on tab selection).
Do we have onclick event on tab (in JTabbedPan)?

Eg: My JTabbedPan contains tabs Tab1,Tab2,Tab3.
So, if user clicks on tab2 it starts loading the tab and adds component to tab2. simillarly for tab1 and tab3.

Is this possible??? If so kindly help/guide me. (Any related information or article is most welcome).

Thanks in advance.

 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Based on tab selection"... does that mean you are actually interested in when a tab is selected? In that case just add a ChangeListener to the JTabbedPane and it will be notified whenever a new tab is selected.
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"nagenda bvvs", please check your private messages regarding an important administrative matter.

Thank you.
 
nagendra bvvs
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks all.
ChangeListener has gave solution for my requirement.

Thank you so much.
 
reply
    Bookmark Topic Watch Topic
  • New Topic