You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrey Pavlenko (JIRA)" <ji...@apache.org> on 2007/02/08 17:12:06 UTC

[jira] Commented: (HARMONY-1605) [classlib][awt]Compatibility: java.awt.Window has null default Font on RI while it hasn't on Harmony

    [ https://issues.apache.org/jira/browse/HARMONY-1605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471384 ] 

Andrey Pavlenko commented on HARMONY-1605:
------------------------------------------

The applied patch is incomplete. The method Wndow.getFont() returns null only if the window is not visible. In case the window is visible this method returns default font, see the following example.

    public void testGetFont() {
        final Frame f = new Frame();

        assertNull(f.getFont());
        f.setVisible(true);
        assertNotNull(f.getFont());
        assertEquals(new Font("Dialog", Font.PLAIN, 12), f.getFont()); //$NON-NLS-1$
        f.setVisible(false);
        f.dispose();
    }


> [classlib][awt]Compatibility: java.awt.Window has null default Font on RI while it hasn't on Harmony
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1605
>                 URL: https://issues.apache.org/jira/browse/HARMONY-1605
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ilya Okomin
>         Assigned To: Alexey Petrenko
>            Priority: Minor
>         Attachments: Harmony-1605-test.patch, Harmony-1605.patch
>
>
> If no Font set to java.awt.Window object RI returns null while Harmony returns instanse of Font with default parameters.
> Check the output of the test case:
> --------------test.java--------------
> import java.awt.*;
> public class test{
>     public static void main(String[] args) {
>         Window w = new Window(new Frame());
>         Font f = w.getFont();
>         System.out.println("Window default font: " + f);
>     }
> }
> ----------------------------------------
> ====== Output RI =======
> Window default font : null
> ====== Output Harmony ======
> Window default font : java.awt.Font[family=Default,name=dialog,style=plain,size=12]

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