Javatpoint Logo
Javatpoint Logo

Java JPopupMenu

PopupMenu can be dynamically popped up at specific position within a component. It inherits the JComponent class.

JPopupMenu class declaration

Let's see the declaration for javax.swing.JPopupMenu class.


Commonly used Constructors:

Constructor Description
JPopupMenu() Constructs a JPopupMenu without an "invoker".
JPopupMenu(String label) Constructs a JPopupMenu with the specified title.

Java JPopupMenu Example

Output:

JAVA Jpopmenu 1

Java JPopupMenu Example with MouseListener and ActionListener

Output:

JAVA Jpopmenu 2



Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA