You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexei Zakharov (JIRA)" <ji...@apache.org> on 2007/08/23 13:00:32 UTC

[jira] Assigned: (HARMONY-4655) [classlib][swing]Setting null as margin to button don't cause to use the default margin

     [ https://issues.apache.org/jira/browse/HARMONY-4655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov reassigned HARMONY-4655:
----------------------------------------

    Assignee: Alexei Zakharov

> [classlib][swing]Setting null as margin to button don't cause to use the default margin
> ---------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4655
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4655
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitry Irlyanov
>            Assignee: Alexei Zakharov
>            Priority: Minor
>         Attachments: H4655-AbstractButton.patch, H4655-AbstractButtonTest.patch
>
>
> According to spec, AbstractButton.setMargin(null) causes the button to use the default margin (2,2,2,2) but Harmony doesn't obey this rule
> import java.awt.Insets;
> import javax.swing.JRadioButton;
> public class Test {
>     public static void main(String[] args) {
>         
>         JRadioButton rb = new JRadioButton();
>         System.err.println(rb.getMargin());
>         rb.setMargin(null);
>         System.err.println(rb.getMargin());
>         rb.setMargin(new Insets(10,10,10,10));
>         System.err.println(rb.getMargin());
>         rb.setMargin(null);
>         System.err.println(rb.getMargin());
>     }
> }
> Output(RI):
> javax.swing.plaf.InsetsUIResource[top=2,left=2,bottom=2,right=2]
> javax.swing.plaf.InsetsUIResource[top=2,left=2,bottom=2,right=2]
> java.awt.Insets[top=10,left=10,bottom=10,right=10]
> javax.swing.plaf.InsetsUIResource[top=2,left=2,bottom=2,right=2]
> Output(Harmony):
> javax.swing.plaf.InsetsUIResource[left=2,top=2,right=2,bottom=2]
> null
> java.awt.Insets[left=10,top=10,right=10,bottom=10]
> null

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.