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

Different behavior of JMenu and JPopupMenu

XMLWordPrintable

    • x86
    • windows_xp

      There are two methods for adding Action into JMenu and JPopupMenu:
      1. JMenuItem add(new JMenuItem(Action))
      2. JMenuItem add(Action)

      In second case we create anonymous subclass of JMenuItem.
      But java.beans.XMLEncoder could not persist properly this JMenuItem because it isn't JavaBean: there are no public empty constructor. And XMLEncoder (and XMLDecoder) could not create instance of private anonymous class.

      Could you implement method add(Action) as simple shortcut to method add(new JMenuItem(Action))?

            Unassigned Unassigned
            malenkov Sergey Malenkov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: