Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4172190

Submenus do not open using JPopupMenu.setDefaultLightWeightPopupEnabled(false);

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.1.6
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      Description



      Name: diC59631 Date: 09/09/98


      In swing11.beta2:
      When building JMenuBar with a File menu that contains submenus, the submenus do not open when
      clicking on them, if JPopupMenu.setDefaultLightWeightPopupEnabled(false); is used.

      This is the example code:

      public class MenTest extends java.lang.Object
      {
      public static void main(String args[])
      {
      JPopupMenu.setDefaultLightWeightPopupEnabled(false);
      JFrame frame = new JFrame();
      frame.setSize(300, 300);

      JPanel pan = new JPanel();
      pan.setLayout(new BorderLayout());

      JMenuBar mb = new JMenuBar();
      pan.add(mb, BorderLayout.NORTH);

      JMenu file = new JMenu("File");
      mb.add(file);

      JMenu neww = new JMenu("New");
      file.add(neww);

      JMenu open = new JMenu("Open");
      file.add(open);

      JMenuItem create = new JMenuItem("Create");
      neww.add(create);

      JMenuItem browse = new JMenuItem("Browse");
      open.add(browse);

      frame.getContentPane().add(pan);
      frame.show();
      }
      }
      (Review ID: 38531)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gsaab Georges Saab
              Reporter:
              dindrigo Daniel Indrigo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: