harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-1533) [classlib][swing] JCombobox.setSelectedItem() sometimes doesn't fire action event
Date Tue, 10 Oct 2006 21:50:20 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1533?page=all ]

Tim Ellison resolved HARMONY-1533.
----------------------------------

    Resolution: Fixed

Thanks Dmitry,

Patch applied to SWING module at repo revision r462591.

Please check that the patch was applied as you expected.


> [classlib][swing] JCombobox.setSelectedItem() sometimes doesn't fire action event
> ---------------------------------------------------------------------------------
>
>                 Key: HARMONY-1533
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1533
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitry A. Durnev
>         Assigned To: Tim Ellison
>            Priority: Minor
>         Attachments: H1533-JComboBox.patch, H1533-tests.patch
>
>
> Spec of JCombobox.setSelectedItem() says:
> ActionListeners added to the combo box will be notified with an ActionEvent when this
method is called. 
> But the following test prints "false" on Harmony & "true" on RI:
> public class JComboboxTest {
>     private static boolean fired;
>    public class JComboboxTest {
>     private static boolean fired;
>     public static void main(String[] args) {
>         String item = "item";
>         JComboBox jcb = new JComboBox(new String[]{item});
>         jcb.addActionListener(new ActionListener(){
>             public void actionPerformed(ActionEvent ae) {
>                 fired = true;               
>             }            
>         });
>         jcb.setSelectedItem(item);
>         System.out.println(fired);
>     }
> }

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