-
Bug
-
Resolution: Unresolved
-
P4
-
5.0
-
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))?
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))?
- relates to
-
JDK-4950972 LTP: Long-term persistence bugs (swing, Encoder, XMLEncoder)
-
- Open
-