harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4756) [classlib][swing] JFrame.pack() sets window size incorrectly
Date Thu, 06 Sep 2007 22:49:28 GMT
[classlib][swing] JFrame.pack() sets window size incorrectly
------------------------------------------------------------

                 Key: HARMONY-4756
                 URL: https://issues.apache.org/jira/browse/HARMONY-4756
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Vasily Zakharov


If JFrame.pack() is used to set window size, some contents remain hidden on Harmony, while
RI sets the window size to fit content size.

Here's the simple reproducer:

import javax.swing.JEditorPane;
import javax.swing.JFrame;
public class Test {
    public static void main(String argv[]) {
        try {
            JFrame frame = new JFrame("Test");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.getContentPane().add(new JEditorPane("text/html", "1<br>2<br>3<br>4"));
            frame.pack();
            frame.setVisible(true);
        } catch (Exception e) {
            e.printStackTrace(System.out);
        }
    }
}

The attached screenshots demonstrate the problem.


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


Mime
View raw message