Hello everyone,
I am working on a program right now and part of the idea involves
a pop-up menu.

What I need is something like:

A small box in the program,
On MouseOver small box, small pop-up menu opens up next to the small box,
On MouseOver menu option 1, a sub-menu opens next to pop-up menu

So, I'm sure this can be done, but I don't know how.

Any tips or advice would be very much appreciated!

Thanks in advance!


Recommended Answers

Knowing about JMenus might help you. Here is Sun's/Oracle's tutorial on how to use menus. http://download.oracle.com/javase/tutorial/uiswing/components/menu.html

Hope this helps.

Jump to Post

All 4 Replies

if it's a jFrame you want to show and hide when clicked on a button,
add the right events triggered by the button, and call the setVisible(boolean) function.

if this small box would be JButton, then you can overRide ButtonModel

Thanks everyone!

You have all been a GREAT help!


Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.