Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 60039 invoked from network); 20 Sep 2007 09:31:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Sep 2007 09:31:52 -0000 Received: (qmail 7979 invoked by uid 500); 20 Sep 2007 09:31:43 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 7890 invoked by uid 500); 20 Sep 2007 09:31:43 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 7880 invoked by uid 99); 20 Sep 2007 09:31:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Sep 2007 02:31:43 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Sep 2007 09:31:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 153F871420A for ; Thu, 20 Sep 2007 02:31:31 -0700 (PDT) Message-ID: <23362030.1190280691079.JavaMail.jira@brutus> Date: Thu, 20 Sep 2007 02:31:31 -0700 (PDT) From: "Linbin Yu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-4756) [classlib][swing] JFrame.pack() sets window size incorrectly In-Reply-To: <31802058.1189118968545.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Linbin Yu updated HARMONY-4756: ------------------------------- Attachment: harmony-4756-fix.patch This patch can fix this issue. Just add "getUI().getRootView(this).setSize(0,0);" in the first line of JEditPane.getPreferredSize(), I think it's about refreshing of the JEditPane view . Maybe it's related to other issue, just for reference. > [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 > Attachments: harmony-4756-fix.patch, Harmony.jpg, RI.jpg > > > 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
2
3
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.