-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
6
-
x86
-
linux
J2SE Version (please include all output from java -version flag):
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b97)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b97, mixed mode)
Does this problem occur on J2SE 1.4.x or 5.0.x ? Yes / No (pick one)
No
Operating System Configuration Information (be specific):
Red Hat Linux 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
Hardware Configuration Information (be specific):
Intel Pentium III 1000MHz
Bug Description:
Menu Item cannot be selected while the Frame is maximized if the code has called the java.awt.Component setLocation(int, int) method.
Steps to Reproduce (be specific):
1) Compile the following source code
/// Start Source ///
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class MenuTest0 extends JFrame {
public MenuTest0() {
Container contentPane = getContentPane();
contentPane.setLayout(new BorderLayout());
JMenuBar menuBar = new JMenuBar();
JMenu fileMenu = new JMenu("File");
final JMenuItem fileExitMenuItem = new JMenuItem("Exit");
fileMenu.add(fileExitMenuItem);
ActionListener menuActionAdaptor = new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (e.getSource() == fileExitMenuItem) {
close();
}
}
};
fileExitMenuItem.addActionListener(menuActionAdaptor);
menuBar.add(fileMenu);
setJMenuBar(menuBar);
setTitle("Bug Test");
setSize(300, 200);
setLocation(50, 50); //Comment out this line to work around bug
setVisible(true);
}
private void close() {
setVisible(false);
dispose();
System.exit(0);
}
public static void main(String[] args) throws Exception {
new MenuTest0();
}
}
/// End Source ///
2) Run the test case using the command "java MenuTest0"
3) Maximize the Window. The File | Exit menu item cannot be selected until the window is minimized.
This problem does not occur
a) if you use the Java 5 JVM (build 1.5.0_03_b07) or Java 6 in Windows OR
b) if you comment out the setLocation(int, int) call.
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b97)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b97, mixed mode)
Does this problem occur on J2SE 1.4.x or 5.0.x ? Yes / No (pick one)
No
Operating System Configuration Information (be specific):
Red Hat Linux 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
Hardware Configuration Information (be specific):
Intel Pentium III 1000MHz
Bug Description:
Menu Item cannot be selected while the Frame is maximized if the code has called the java.awt.Component setLocation(int, int) method.
Steps to Reproduce (be specific):
1) Compile the following source code
/// Start Source ///
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class MenuTest0 extends JFrame {
public MenuTest0() {
Container contentPane = getContentPane();
contentPane.setLayout(new BorderLayout());
JMenuBar menuBar = new JMenuBar();
JMenu fileMenu = new JMenu("File");
final JMenuItem fileExitMenuItem = new JMenuItem("Exit");
fileMenu.add(fileExitMenuItem);
ActionListener menuActionAdaptor = new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (e.getSource() == fileExitMenuItem) {
close();
}
}
};
fileExitMenuItem.addActionListener(menuActionAdaptor);
menuBar.add(fileMenu);
setJMenuBar(menuBar);
setTitle("Bug Test");
setSize(300, 200);
setLocation(50, 50); //Comment out this line to work around bug
setVisible(true);
}
private void close() {
setVisible(false);
dispose();
System.exit(0);
}
public static void main(String[] args) throws Exception {
new MenuTest0();
}
}
/// End Source ///
2) Run the test case using the command "java MenuTest0"
3) Maximize the Window. The File | Exit menu item cannot be selected until the window is minimized.
This problem does not occur
a) if you use the Java 5 JVM (build 1.5.0_03_b07) or Java 6 in Windows OR
b) if you comment out the setLocation(int, int) call.