-
Bug
-
Resolution: Fixed
-
P4
-
6
A DESCRIPTION OF THE REGRESSION :
Windows XP Professional SP1+
JDK: mustang b73
Create a jtextfield on the parent window, when a modal dialog is popuped, moving the mouse onto jtextfield at the background should not cause the cursor to be changed.
REPRODUCIBLE TESTCASE OR STEPS TO REPRODUCE:
package testbug;
import java.awt.Dimension;
import java.awt.FileDialog;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JTextField;
public class TestAWTDialog extends JFrame {
private JMenuBar jMenuBar1 = new JMenuBar();
private JMenu jMenu1 = new JMenu();
private JMenuItem jMenuItem1 = new JMenuItem();
private JMenuItem jMenuItem2 = new JMenuItem();
private JTextField jTextField1 = new JTextField();
public TestAWTDialog() {
try {
jbInit();
} catch (Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.setJMenuBar(jMenuBar1);
this.setDefaultCloseOperation(0);
this.setSize(new Dimension(400, 300));
this.setTitle("File->Open->Move your mouse onto TextField");
jMenu1.setText("File");
jMenuItem1.setText("Open");
jMenuItem1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jMenuItem1_actionPerformed(e);
}
});
jMenuItem2.setText("Exit");
jMenuItem2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jMenuItem2_actionPerformed(e);
}
});
jMenu1.add(jMenuItem1);
jMenu1.add(jMenuItem2);
jMenuBar1.add(jMenu1);
this.getContentPane().add(jTextField1, null);
}
private void jMenuItem2_actionPerformed(ActionEvent e) {
System.exit(0);
}
private void jMenuItem1_actionPerformed(ActionEvent e) {
FileDialog fd = new FileDialog(this);
fd.setMode(FileDialog.LOAD);
fd.setTitle("File dialog");
fd.setVisible(true);
}
public static void main(String[] argv){
TestAWTDialog dlg = new TestAWTDialog();
dlg.setVisible(true);
}
}
RELEASE LAST WORKED:
5.0 Update 6
RELEASE TEST FAILS:
mustang-beta
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Default cursor
ACTUAL -
The cursor is changed to a "I" while it should be a pointer...
Release Regression From : 5.0u6
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
Windows XP Professional SP1+
JDK: mustang b73
Create a jtextfield on the parent window, when a modal dialog is popuped, moving the mouse onto jtextfield at the background should not cause the cursor to be changed.
REPRODUCIBLE TESTCASE OR STEPS TO REPRODUCE:
package testbug;
import java.awt.Dimension;
import java.awt.FileDialog;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JTextField;
public class TestAWTDialog extends JFrame {
private JMenuBar jMenuBar1 = new JMenuBar();
private JMenu jMenu1 = new JMenu();
private JMenuItem jMenuItem1 = new JMenuItem();
private JMenuItem jMenuItem2 = new JMenuItem();
private JTextField jTextField1 = new JTextField();
public TestAWTDialog() {
try {
jbInit();
} catch (Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.setJMenuBar(jMenuBar1);
this.setDefaultCloseOperation(0);
this.setSize(new Dimension(400, 300));
this.setTitle("File->Open->Move your mouse onto TextField");
jMenu1.setText("File");
jMenuItem1.setText("Open");
jMenuItem1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jMenuItem1_actionPerformed(e);
}
});
jMenuItem2.setText("Exit");
jMenuItem2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jMenuItem2_actionPerformed(e);
}
});
jMenu1.add(jMenuItem1);
jMenu1.add(jMenuItem2);
jMenuBar1.add(jMenu1);
this.getContentPane().add(jTextField1, null);
}
private void jMenuItem2_actionPerformed(ActionEvent e) {
System.exit(0);
}
private void jMenuItem1_actionPerformed(ActionEvent e) {
FileDialog fd = new FileDialog(this);
fd.setMode(FileDialog.LOAD);
fd.setTitle("File dialog");
fd.setVisible(true);
}
public static void main(String[] argv){
TestAWTDialog dlg = new TestAWTDialog();
dlg.setVisible(true);
}
}
RELEASE LAST WORKED:
5.0 Update 6
RELEASE TEST FAILS:
mustang-beta
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Default cursor
ACTUAL -
The cursor is changed to a "I" while it should be a pointer...
Release Regression From : 5.0u6
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
- relates to
-
JDK-6408077 regression: Mouse cursor is not changing to default cursor when the mouse cursor is on the scrollbar
- Closed
-
JDK-6478635 Mouse Cusor remains to Textcusor even after the modal dialog is visible.
- Closed
-
JDK-7147055 [macosx] Cursors are changing over a blocked window; also blinking
- Closed