PopupMenu.show() blocks on Windows 95 in JDK 1.1.1, but not on Solaris under either 1.1.1 or 1.1.2 as of April 30. I can think of no great reason it should block, but whether or not it does, it should be consistent among the platforms. Here is a sample program - import java.awt.*; public class XX { public static void main(String[] args){ Frame f = new Frame(); Panel p = new Panel(); p.setSize(200,200); p.setLayout(null); f.add("Center",p); f.pack(); f.setVisible(true); PopupMenu m = new PopupMenu(); m.add("Item A"); m.add("Item B"); p.add(m); m.show(p,50,50); System.out.println("Show has returned"); } } On Solaris, "Show has returned" prints immediately (while PopupMenu is still showing). On Windows, "Show has returned" does not print until after an item is selected (or the popup is dismissed). I have reverified that this bug still exists in 1.1.5. thomas.lichtenberg@Eng 1998-03-04 Also on WindowsNT. The sample program above is a usable test case. a similar one is attached. I added keyword pjava as this bug also affects Personal Java
|