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] Created: (HARMONY-1547) [classlib][awt] Swing components lose focus immediately after gaining it by mouse press
Date Fri, 22 Sep 2006 13:14:22 GMT
[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

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();
        JPanel p = new JPanel();
        JFrame jf = new JFrame("radio button test");



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


View raw message