-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.2.2
-
x86
-
linux
Name: kaC94536 Date: 11/19/99
Java 2 Platform SE v1.3 specification reads:
...
public void show(Component origin,
int x,
int y)
Shows the popup menu at the x, y position relative to an origin
component.
...
But the following test always shows popup menu at the upper left corner of
the screen. Such behavior of PopupMenu.show method was found both in runs with
JIT and without JIT.
This bug affects api/java_awt/interactive/PMenuTest.html JCK test.
----------------------------- test.java ------------------------
import java.awt.Frame;
import java.awt.Menu;
import java.awt.PopupMenu;
public class Test {
static PopupMenu popup = null;
static Frame testFrame = null;
public static void main( String[] argv ) {
testFrame = new Frame();
testFrame.setSize(700,400);
popup = new PopupMenu("Popup Menu Title");
Menu menu = new Menu("Menu");
popup.add(menu);
testFrame.add(popup);
testFrame.setVisible(true);
popup.show(testFrame, 50,50);
}
}
======================================================================
======================================================================