This week's book giveaway is in the JavaScript forum.
We're giving away four copies of JavaScript Promises Essentials and have Rami Sarieddine on-line!
See this thread for details.
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 JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Handling tabbedpane events" Watch "Handling tabbedpane events" New topic
Author

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

P.S.
I'm using JDeveloper

A. Honarmand
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4658
    
    5

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: 2213
    
    7
Use a ChangeListener to know when a new tab has been selected.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Handling tabbedpane events