harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-1547) [classlib][awt] Swing components lose focus immediately after gaining it by mouse press
Date Mon, 30 Oct 2006 07:23:02 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1547?page=all ]

Mikhail Loenko closed HARMONY-1547.
-----------------------------------

    Assignee: weldon washburn  (was: Mikhail Loenko)

> [classlib][awt] Swing components lose focus immediately after gaining it by mouse press
> ---------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1547
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1547
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP/x86
>            Reporter: Dmitry A. Durnev
>         Assigned To: weldon washburn
>         Attachments: H1547-InputMethodContext.patch
>
>
> All swing components which request focus on mouse click, such as buttons, radio buttons,
comboboxes, etc. get 3 focus events: FOCUS_GAINED, FOCUS_LOST, FOCUS_GAINED on each mouse
press. This leads to incorrect behavior of some components, for example in the following test
> run on Harmony:
> import javax.swing.ButtonGroup;
> import javax.swing.JFrame;
> import javax.swing.JPanel;
> import javax.swing.JRadioButton;
> public class JButtonTest {
>     public static void main(String[] args) {
>         JRadioButton jb = new JRadioButton("button");
>         JRadioButton jb1 = new JRadioButton("button1");
>         ButtonGroup bg = new ButtonGroup();
>         bg.add(jb);
>         bg.add(jb1);
>         JPanel p = new JPanel();
>         p.add(jb1);
>         p.add(jb);
>         JFrame jf = new JFrame("radio button test");
>         jf.getContentPane().add(p);        
>         jf.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
>         jf.pack();
>         jf.show();        
>     }
> }
> radio buttons only get focus on first mouse click, but don't get selected/deselected.
> They have to be clicked twice to get selected.

-- 
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

        

Mime
View raw message