harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry A. Durnev (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-1547) [classlib][awt] Swing components lose focus immediately after gaining it by mouse press
Date Fri, 22 Sep 2006 13:21:26 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1547?page=all ]

Dmitry A. Durnev updated HARMONY-1547:
--------------------------------------

    Attachment: H1547-InputMethodContext.patch

The cause of the problem is that the input method framework tries to end composition when
focus is transfered to new component even if there was no composition going on. Fix is attached.

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