File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 4543
    
    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: 2182
    
    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