You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Denis Kishenko (JIRA)" <ji...@apache.org> on 2006/11/24 13:08:02 UTC

[jira] Created: (HARMONY-2305) [classlib][awt] Several components can be active concurrently

[classlib][awt] Several components can be active concurrently
-------------------------------------------------------------

                 Key: HARMONY-2305
                 URL: http://issues.apache.org/jira/browse/HARMONY-2305
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Denis Kishenko


Several components can be active concurrently. For example, 2 buttons can be 
depressed at one time (one with mouse, one with space key). It may lead 
unpredictable behavior.

============ Test ==============
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import java.awt.Button;
import javax.swing.JFrame;

public class Test {

    public static void main(String[] args) {
        
        JFrame f = new JFrame("Test");
        Container cp = f.getContentPane();
        cp.add(BorderLayout.NORTH, new Button("Button 1"));
        cp.add(BorderLayout.SOUTH, new Button("Button 2"));

        f.addWindowListener(
                new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                        System.exit(0);
                    }
                }
            );          

        f.setSize(200, 80);
        f.setVisible(true);
    }
    
}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (HARMONY-2305) [classlib][awt] Several components can be active concurrently

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov closed HARMONY-2305.
------------------------------------


Issue closed

> [classlib][awt] Several components can be active concurrently
> -------------------------------------------------------------
>
>                 Key: HARMONY-2305
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2305
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Assigned To: Alexei Zakharov
>         Attachments: HARMONY-2305-ButtonRTest.patch, HARMONY-2305-ButtonStateController.patch
>
>
> Several components can be active concurrently. For example, 2 buttons can be 
> depressed at one time (one with mouse, one with space key). It may lead 
> unpredictable behavior.
> ============ Test ==============
> import java.awt.BorderLayout;
> import java.awt.Container;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> import java.awt.Button;
> import javax.swing.JFrame;
> public class Test {
>     public static void main(String[] args) {
>         
>         JFrame f = new JFrame("Test");
>         Container cp = f.getContentPane();
>         cp.add(BorderLayout.NORTH, new Button("Button 1"));
>         cp.add(BorderLayout.SOUTH, new Button("Button 2"));
>         f.addWindowListener(
>                 new WindowAdapter() {
>                     public void windowClosing(WindowEvent e) {
>                         System.exit(0);
>                     }
>                 }
>             );          
>         f.setSize(200, 80);
>         f.setVisible(true);
>     }
>     
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2305) [classlib][awt] Several components can be active concurrently

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov updated HARMONY-2305:
-------------------------------------

    Patch Info: [Patch Available]

> [classlib][awt] Several components can be active concurrently
> -------------------------------------------------------------
>
>                 Key: HARMONY-2305
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2305
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Attachments: HARMONY-2305-ButtonRTest.patch, HARMONY-2305-ButtonStateController.patch
>
>
> Several components can be active concurrently. For example, 2 buttons can be 
> depressed at one time (one with mouse, one with space key). It may lead 
> unpredictable behavior.
> ============ Test ==============
> import java.awt.BorderLayout;
> import java.awt.Container;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> import java.awt.Button;
> import javax.swing.JFrame;
> public class Test {
>     public static void main(String[] args) {
>         
>         JFrame f = new JFrame("Test");
>         Container cp = f.getContentPane();
>         cp.add(BorderLayout.NORTH, new Button("Button 1"));
>         cp.add(BorderLayout.SOUTH, new Button("Button 2"));
>         f.addWindowListener(
>                 new WindowAdapter() {
>                     public void windowClosing(WindowEvent e) {
>                         System.exit(0);
>                     }
>                 }
>             );          
>         f.setSize(200, 80);
>         f.setVisible(true);
>     }
>     
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-2305) [classlib][awt] Several components can be active concurrently

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov resolved HARMONY-2305.
--------------------------------------

    Resolution: Fixed

Thanks Denis and Andrey. I've applied the patch at the revision 517236. Please verify. BTW the test fails on RI on Linux. But RI's behavior on Linux is really strange, I'm -1 for following it. Now we are compatible with Windows variant of RI.

> [classlib][awt] Several components can be active concurrently
> -------------------------------------------------------------
>
>                 Key: HARMONY-2305
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2305
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Assigned To: Alexei Zakharov
>         Attachments: HARMONY-2305-ButtonRTest.patch, HARMONY-2305-ButtonStateController.patch
>
>
> Several components can be active concurrently. For example, 2 buttons can be 
> depressed at one time (one with mouse, one with space key). It may lead 
> unpredictable behavior.
> ============ Test ==============
> import java.awt.BorderLayout;
> import java.awt.Container;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> import java.awt.Button;
> import javax.swing.JFrame;
> public class Test {
>     public static void main(String[] args) {
>         
>         JFrame f = new JFrame("Test");
>         Container cp = f.getContentPane();
>         cp.add(BorderLayout.NORTH, new Button("Button 1"));
>         cp.add(BorderLayout.SOUTH, new Button("Button 2"));
>         f.addWindowListener(
>                 new WindowAdapter() {
>                     public void windowClosing(WindowEvent e) {
>                         System.exit(0);
>                     }
>                 }
>             );          
>         f.setSize(200, 80);
>         f.setVisible(true);
>     }
>     
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2305) [classlib][awt] Several components can be active concurrently

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Pavlenko updated HARMONY-2305:
-------------------------------------

    Attachment: HARMONY-2305-ButtonRTest.patch
                HARMONY-2305-ButtonStateController.patch

This patch fixing the issue.
Note: the regression test will fail until HARMONY-3286 is fixed.

> [classlib][awt] Several components can be active concurrently
> -------------------------------------------------------------
>
>                 Key: HARMONY-2305
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2305
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Attachments: HARMONY-2305-ButtonRTest.patch, HARMONY-2305-ButtonStateController.patch
>
>
> Several components can be active concurrently. For example, 2 buttons can be 
> depressed at one time (one with mouse, one with space key). It may lead 
> unpredictable behavior.
> ============ Test ==============
> import java.awt.BorderLayout;
> import java.awt.Container;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> import java.awt.Button;
> import javax.swing.JFrame;
> public class Test {
>     public static void main(String[] args) {
>         
>         JFrame f = new JFrame("Test");
>         Container cp = f.getContentPane();
>         cp.add(BorderLayout.NORTH, new Button("Button 1"));
>         cp.add(BorderLayout.SOUTH, new Button("Button 2"));
>         f.addWindowListener(
>                 new WindowAdapter() {
>                     public void windowClosing(WindowEvent e) {
>                         System.exit(0);
>                     }
>                 }
>             );          
>         f.setSize(200, 80);
>         f.setVisible(true);
>     }
>     
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-2305) [classlib][awt] Several components can be active concurrently

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov reassigned HARMONY-2305:
----------------------------------------

    Assignee: Alexei Zakharov

> [classlib][awt] Several components can be active concurrently
> -------------------------------------------------------------
>
>                 Key: HARMONY-2305
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2305
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Assigned To: Alexei Zakharov
>         Attachments: HARMONY-2305-ButtonRTest.patch, HARMONY-2305-ButtonStateController.patch
>
>
> Several components can be active concurrently. For example, 2 buttons can be 
> depressed at one time (one with mouse, one with space key). It may lead 
> unpredictable behavior.
> ============ Test ==============
> import java.awt.BorderLayout;
> import java.awt.Container;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> import java.awt.Button;
> import javax.swing.JFrame;
> public class Test {
>     public static void main(String[] args) {
>         
>         JFrame f = new JFrame("Test");
>         Container cp = f.getContentPane();
>         cp.add(BorderLayout.NORTH, new Button("Button 1"));
>         cp.add(BorderLayout.SOUTH, new Button("Button 2"));
>         f.addWindowListener(
>                 new WindowAdapter() {
>                     public void windowClosing(WindowEvent e) {
>                         System.exit(0);
>                     }
>                 }
>             );          
>         f.setSize(200, 80);
>         f.setVisible(true);
>     }
>     
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2305) [classlib][awt] Several components can be active concurrently

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480358 ] 

Andrey Pavlenko commented on HARMONY-2305:
------------------------------------------

Alexei, the patch has been applied as expected. You can close the issue, thanks.

> [classlib][awt] Several components can be active concurrently
> -------------------------------------------------------------
>
>                 Key: HARMONY-2305
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2305
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Assigned To: Alexei Zakharov
>         Attachments: HARMONY-2305-ButtonRTest.patch, HARMONY-2305-ButtonStateController.patch
>
>
> Several components can be active concurrently. For example, 2 buttons can be 
> depressed at one time (one with mouse, one with space key). It may lead 
> unpredictable behavior.
> ============ Test ==============
> import java.awt.BorderLayout;
> import java.awt.Container;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> import java.awt.Button;
> import javax.swing.JFrame;
> public class Test {
>     public static void main(String[] args) {
>         
>         JFrame f = new JFrame("Test");
>         Container cp = f.getContentPane();
>         cp.add(BorderLayout.NORTH, new Button("Button 1"));
>         cp.add(BorderLayout.SOUTH, new Button("Button 2"));
>         f.addWindowListener(
>                 new WindowAdapter() {
>                     public void windowClosing(WindowEvent e) {
>                         System.exit(0);
>                     }
>                 }
>             );          
>         f.setSize(200, 80);
>         f.setVisible(true);
>     }
>     
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2305) [classlib][awt] Several components can be active concurrently

Posted by "Denis Kishenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2305?page=comments#action_12452448 ] 
            
Denis Kishenko commented on HARMONY-2305:
-----------------------------------------

JFrame should be changed to Frame 

============ Test ============== 
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public class Test {

    public static void main(String[] args) {
        
        Frame f = new Frame("Test");
        f.add(BorderLayout.NORTH, new Button("Button 1"));
        f.add(BorderLayout.SOUTH, new Button("Button 2"));

        f.addWindowListener(
                new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                        System.exit(0);
                    }
                }
            );          

        f.setSize(200, 80);
        f.setVisible(true);
    }
    
}


> [classlib][awt] Several components can be active concurrently
> -------------------------------------------------------------
>
>                 Key: HARMONY-2305
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2305
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>
> Several components can be active concurrently. For example, 2 buttons can be 
> depressed at one time (one with mouse, one with space key). It may lead 
> unpredictable behavior.
> ============ Test ==============
> import java.awt.BorderLayout;
> import java.awt.Container;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> import java.awt.Button;
> import javax.swing.JFrame;
> public class Test {
>     public static void main(String[] args) {
>         
>         JFrame f = new JFrame("Test");
>         Container cp = f.getContentPane();
>         cp.add(BorderLayout.NORTH, new Button("Button 1"));
>         cp.add(BorderLayout.SOUTH, new Button("Button 2"));
>         f.addWindowListener(
>                 new WindowAdapter() {
>                     public void windowClosing(WindowEvent e) {
>                         System.exit(0);
>                     }
>                 }
>             );          
>         f.setSize(200, 80);
>         f.setVisible(true);
>     }
>     
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira