You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2006/10/11 17:38:22 UTC

[jira] Closed: (HARMONY-1533) [classlib][swing] JCombobox.setSelectedItem() sometimes doesn't fire action event

     [ http://issues.apache.org/jira/browse/HARMONY-1533?page=all ]

Tim Ellison closed HARMONY-1533.
--------------------------------


Verified by Dmitry.


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