commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commit-cp] [bug #13259] swing: JTextArea's preferredSize unusually smal


From: Timo Lindfors
Subject: [commit-cp] [bug #13259] swing: JTextArea's preferredSize unusually small
Date: Wed, 1 Jun 2005 16:47:06 +0000
User-agent: Elinks

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13259>

                 Summary: swing: JTextArea's preferredSize unusually small
                 Project: classpath
            Submitted by: lindi
            Submitted on: Wed 06/01/05 at 16:47
                Category: classpath
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
        Platform Version: None

    _______________________________________________________

Details:

Steps to reproduce:
1. Compile and run the attached testcase.

Expected results:
1. A window shows up. It is large enough so that the whole textarea is shown
(including "text0").
2. Program prints out
minumum size: java.awt.Dimension[width=30,height=15]
preferred size: java.awt.Dimension[width=440,height=150]

Actual results:
1. A window shows up but it is so small that the textarea is completely
invisible.
2. Program prints out
minumum size: java.awt.Dimension[width=40,height=16]
preferred size: java.awt.Dimension[width=40,height=16]

Testcase:
import javax.swing.*;
public class textarea extends JFrame {
        public static void main(String[] args) {
                (new textarea()).show();
                }
        public textarea() {
                JTextArea textarea = new JTextArea(10, 40);
                this.setContentPane(textarea);
                this.pack();
                textarea.setText("text0");
                System.out.println("minumum size: " +
textarea.getMinimumSize());
                System.out.println("preferred size: " +
textarea.getPreferredSize());

        }
}







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13259>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]