Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pop up menu

 
Sandy Schneider
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My objective is to have a JFrame that has some Patient information that must be filled in by a user. I have a combo box with a list of physicians. I have finished this part.
Once the user picks a physician from the combo box, I want a pop-up menu showing the physicians info. I have created a JDialog frame. What I need help on is how to write the event(Physician picked in the combo box) listener so the pop-menu is displayed.
Sandy
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to swing
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would attach an ActionListener to the JComboBox that will launch the JDialog you have created.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic