File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes pop up menu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "pop up menu" Watch "pop up menu" New topic

pop up menu

Sandy Schneider

Joined: Mar 14, 2002
Posts: 22
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.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Moving this to swing

Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

You would attach an ActionListener to the JComboBox that will launch the JDialog you have created.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: pop up menu
It's not a secret anymore!