[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/22965] swing: JTextArea's preferredSize unusually small
From: |
gcc-bugzilla at gcc dot gnu dot org |
Subject: |
[Bug classpath/22965] swing: JTextArea's preferredSize unusually small |
Date: |
16 Oct 2005 01:27:48 -0000 |
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());
}
}
------- Comment #1 from from-classpath at savannah dot gnu dot org 2005-06-06
09:09 -------
A fix has been checked in. Could you retest it?
------- Comment #2 from from-classpath at savannah dot gnu dot org 2005-06-06
09:14 -------
Works, textarea is completely visible.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22965
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug classpath/22965] swing: JTextArea's preferredSize unusually small,
gcc-bugzilla at gcc dot gnu dot org <=