With this code javax.swing.JPopupMenu lw = new javax.swing.JPopupMenu();
lw.setVisible(true);
I get the following:
!! FAIL: javax.swing.JPopupMenu: do_setVisible_2 status=fail with exception=java.lang.NullPointerException
java.lang.NullPointerException
at javax.swing.JPopupMenu.getPopup(JPopupMenu.java:733)
at javax.swing.JPopupMenu.setVisible(JPopupMenu.java:683)
at javax_swing_JPopupMenu.do_setVisible_2(javax_swing_JPopupMenu.java:78)
at javax_swing_JPopupMenu.run(javax_swing_JPopupMenu.java:3510)
at java.lang.Thread.run(Thread.java:579)
Nowhere is Component.setVisible nor JPopupMenu.setVisible documented
to throw any exceptions.
Solaris 8 (sparc), JDK 1.4 build 46
--- begin - test.java-----
import javax.swing.JPopupMenu;
public class test {
public static void main(String[] args) {
JPopupMenu menu = new JPopupMenu();
menu.setVisible(true);
}
}
--- end - test.java ----
Execute in headless mode:
% java -Djava.awt.headless=true test
mark.davidson@Eng 2001-01-19