Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.swing.JMenu;
import javax.swing.JMenuItem;

public class Main {
    public static void main(String[] argv) throws Exception {
        JMenu menu = new JMenu("Menu Label");
        menu.add(new JMenuItem("Item Label"));

        boolean lwPopup = menu.getPopupMenu().isLightWeightPopupEnabled(); // true

        menu.getPopupMenu().setLightWeightPopupEnabled(false);
    }
}