• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handling tabbedpane events

 
ali honarmand
Ranch Hand
Posts: 32
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.
 
Rob Camick
Ranch Hand
Posts: 2565
9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a ChangeListener to know when a new tab has been selected.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic