-
Bug
-
Resolution: Fixed
-
P1
-
1.1.5
-
None
-
1.1.5
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2017666 | 1.2.0 | Mike Bronson | P1 | Resolved | Fixed | 1.2 |
On Solaris *only*, the mouseClicked events are not being generated in a modal Dialog.
Testcase:
% appletviewer http://javaweb.eng/~hinkmond/bugs/modalDialog/TestApplet.html
Try clicking on the "Dismiss" button. The dialog is closed when running with JDK 1.1.4, but not with JDK 1.1.5F.
Source code:
/**
* TestApplet
*
* @author Hinkmond Wong
* %W% %E%
*/
import java.awt.*;
import java.applet.Applet;
import java.awt.event.*;
public class TestApplet extends Applet implements MouseListener {
Dialog dialog;
Button button;
TextArea status;
public void start() {
setLayout(new BorderLayout());
// Create a modal dialog
dialog = new Dialog(new Frame(), true);
dialog.setLayout(new BorderLayout());
dialog.setSize(175, 225);
// Create a status TextArea
status = new TextArea(10, 80);
status.setBackground(Color.black);
status.setForeground(Color.white);
// Create a Dismiss button
button = new Button("Dismiss");
button.setBackground(Color.blue);
button.setForeground(Color.white);
button.addMouseListener(this);
// Add the button and status TextArea to modal dialog
dialog.add("Center", status);
dialog.add("South", button);
dialog.setVisible(true);
}
//------------------------------------------------------------------------
// MouseListener Interface
//------------------------------------------------------------------------
public void mousePressed(MouseEvent event) {
System.out.println("Mouse pressed.");
status.append("Mouse pressed\n");
}
public void mouseReleased(MouseEvent event) {
System.out.println("Mouse released.");
status.append("Mouse released\n");
}
public void mouseEntered(MouseEvent event) {
System.out.println("Mouse entered.");
status.append("Mouse entered\n");
}
public void mouseExited(MouseEvent event) {
System.out.println("Mouse exited.");
status.append("Mouse exited\n");
}
public void mouseClicked(MouseEvent event) {
System.out.println("Mouse clicked. Dismiss window.");
status.append("Mouse clicked. Dismiss window\n");
button.removeMouseListener(this);
dialog.setVisible(false);
}
public void stop() {
}
}
Testcase:
% appletviewer http://javaweb.eng/~hinkmond/bugs/modalDialog/TestApplet.html
Try clicking on the "Dismiss" button. The dialog is closed when running with JDK 1.1.4, but not with JDK 1.1.5F.
Source code:
/**
* TestApplet
*
* @author Hinkmond Wong
* %W% %E%
*/
import java.awt.*;
import java.applet.Applet;
import java.awt.event.*;
public class TestApplet extends Applet implements MouseListener {
Dialog dialog;
Button button;
TextArea status;
public void start() {
setLayout(new BorderLayout());
// Create a modal dialog
dialog = new Dialog(new Frame(), true);
dialog.setLayout(new BorderLayout());
dialog.setSize(175, 225);
// Create a status TextArea
status = new TextArea(10, 80);
status.setBackground(Color.black);
status.setForeground(Color.white);
// Create a Dismiss button
button = new Button("Dismiss");
button.setBackground(Color.blue);
button.setForeground(Color.white);
button.addMouseListener(this);
// Add the button and status TextArea to modal dialog
dialog.add("Center", status);
dialog.add("South", button);
dialog.setVisible(true);
}
//------------------------------------------------------------------------
// MouseListener Interface
//------------------------------------------------------------------------
public void mousePressed(MouseEvent event) {
System.out.println("Mouse pressed.");
status.append("Mouse pressed\n");
}
public void mouseReleased(MouseEvent event) {
System.out.println("Mouse released.");
status.append("Mouse released\n");
}
public void mouseEntered(MouseEvent event) {
System.out.println("Mouse entered.");
status.append("Mouse entered\n");
}
public void mouseExited(MouseEvent event) {
System.out.println("Mouse exited.");
status.append("Mouse exited\n");
}
public void mouseClicked(MouseEvent event) {
System.out.println("Mouse clicked. Dismiss window.");
status.append("Mouse clicked. Dismiss window\n");
button.removeMouseListener(this);
dialog.setVisible(false);
}
public void stop() {
}
}
- backported by
-
JDK-2017666 JDK115F REGRESSION: mouseClicked events are not generated on Solaris
-
- Resolved
-