-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.3.1
-
x86
-
windows_2000
Name: boT120536 Date: 04/22/2001
java version "1.3.1-rc1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-rc1-b21)
Java HotSpot(TM) Client VM (build 1.3.1-rc1-b21, mixed mode)
On my system, I have two monitors. The second is on the right of the
primary display. When a swing app in in the secondary display, all the drop
down windows open to the left. If the window is near the left edge of the
secondary window, the drop down ends up running over to the first display.
Here is some example code:
import javax.swing.*;
public class DropDownBug {
public static void main(String args []) {
JFrame frame = new JFrame();
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu("File");
JMenuItem menuitem = new JMenuItem("This is a long menu item name");
menu.add(menuitem);
menuBar.add(menu);
frame.setJMenuBar(menuBar);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(300,300);
frame.show();
}
}
Run this on a multiple monitor system with the secondary monitor to the right
of the primary display. Place the frame on the secondary monitor and click on
the "File" menu. Rather than creating a popup which seems to drop down and to
the right, the menu will drop down and to the left.
Note - on a single monitor system, you can get a similar effect by moving the
frame to the far right of the screen. If the drop down menu doesn't have
enough room to drop down and to the right, it will drop down and to the left.
The bug is probably in the code that keeps popup menus from disapearing off the
right side of the screen in an ordinary system setup.
(Review ID: 120805)
======================================================================
- duplicates
-
JDK-4482979 Menus, tooltips and comboboxs pop up wrong on multi-headed machines
-
- Resolved
-