aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Handling tabbedpane events Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Handling tabbedpane events" Watch "Handling tabbedpane events" New topic

Handling tabbedpane events

ali honarmand
Ranch Hand

Joined: Oct 12, 2009
Posts: 32

Hi everyone,
I'm using JTabbedPane on a JFrame. I have got two JPanels added to the JTabbedPane as my tabs. on first tab I have got a list which includes data loaded from DB. the next tab contains "Insert" function, which takes a name and inserts it to the DB(where list reads its data from). the problem is that I can not handle events to control switching between tabs to update list to show the new item inserted. Now I need your help.

thanks in prior,

A. Honarmand

I'm using JDeveloper

A. Honarmand
Darryl Burke

Joined: May 03, 2008
Posts: 4825

To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.

luck, db
There are no new questions, but there may be new answers.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2282
Use a ChangeListener to know when a new tab has been selected.
Have you tried LearnNowOnline?
subject: Handling tabbedpane events