Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.swing.JMenu;
import javax.swing.JPopupMenu;

public class Main {
    public static void main(String[] argv) throws Exception {
        final JPopupMenu popupMenu = new JPopupMenu();

        JMenu submenu = new JMenu("SubMenu1");
        submenu.add("asdf");
        submenu.add("asdf");

        // Add submenu to popup menu
        popupMenu.add(submenu);
    }
}