You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Loenko (JIRA)" <ji...@apache.org> on 2006/10/20 13:12:48 UTC
[jira] Assigned: (HARMONY-1547) [classlib][awt] Swing components
lose focus immediately after gaining it by mouse press
[ http://issues.apache.org/jira/browse/HARMONY-1547?page=all ]
Mikhail Loenko reassigned HARMONY-1547:
---------------------------------------
Assignee: 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: Mikhail Loenko
> 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