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

java.awt.button behaves differently under Win32/Solaris

    Details

    • Subcomponent:
    • Resolved In Build:
      1.1.8
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description



        Name: vlC75247 Date: 09/15/98



        Under Solaris disable Button generates MouseEvents for mouse button click.
        Hovewer it is not the case for win32 platform.
        Java applications should have same behaviour on all platforms.

        To reproduce use the following test:

        ----------- begin ButtonTest.java

        import java.awt.*;
        import java.awt.event.*;

        public class ButtonTest extends Frame
        {
        private class ButtonMouseListener extends MouseAdapter {
        public void mousePressed(MouseEvent e)
        {
        System.out.println("mouse clicked");
        Button button = (Button) e.getSource();
        button.setEnabled(false);
        }
           }

           public ButtonTest ( )
           {
           setLayout ( new FlowLayout ( ) );
           Button b = new Button ( "click me!" );
           add ( b );
        ButtonMouseListener bl=new ButtonMouseListener();
        b.addMouseListener(bl);
           pack ( );
        show ( );
                }

                public static void main ( String args[] )
                {
        ButtonTest test = new ButtonTest( );
        }
        }
        --------------- end of ButtonTest.java


        ======================================================================

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tdv Dmitri Trembovetski (Inactive)
                  Reporter:
                  duke J. Duke (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: