-
Bug
-
Resolution: Unresolved
-
P4
-
1.2.2
-
generic
-
generic
The show() method of the AWT popup menu specifies that it would throw a NullPointerException when popup menu's parent is null. But nowhere in the specification, it is mentioned that a popup menu must be added to a component. Only after looking into the tutorials, I figured out that it must be added to the component. It's highly unlikely that a new developer can guess this as it is not a very common practice to add something to a component. Developers may be used to adding components to containers but this is a bit different.
It is true that any developer can figure out somehow by looking into the tutorials and other documents but I feel it would be better to elborate the API doc a bit for PopupMenu on this. At least, a link could be provided to component.add(popupmenu) method or a link to the tutorials in the same way as it is done for JPopupMenu.
It is true that any developer can figure out somehow by looking into the tutorials and other documents but I feel it would be better to elborate the API doc a bit for PopupMenu on this. At least, a link could be provided to component.add(popupmenu) method or a link to the tutorials in the same way as it is done for JPopupMenu.