Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4089960

JDK115F REGRESSION: mouseClicked events are not generated on Solaris

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: 1.1.5
    • Fix Version/s: 1.1.5
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      1.1.5
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        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() {
            }
        }

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                mbronsonsunw Mike Bronson (Inactive)
                Reporter:
                hinkmond Hinkmond Wong (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: