-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.0
-
sparc
-
solaris_2.4
To followup on this bug, please contact ###@###.###
This code example adds 2 fields and a TextArea to a Panel. Not exactly what I'd do but it should work. The problem is relatively minor- unless you're trying to type on the last line of the TextArea, since the last line is not visible and the second-to-last is only partly visible.
This one comes from a customer.
_____Begin Customer Data_____
What happens: In the attached program, a TextArea is added to a panel and
the panel is added to the frame. A List is added below the panel. Note
that the bottom anchor of the TextArea is obscured by the List; changing
the size of the visible part of the list has no effect.
Thanks for looking into this!
Robert Uomini
>From: ###@###.### (Robert Uomini)
_____End Customer Data_____
In the code below I have removed the List for clarity- the bottom of the TextArea is still not visible even without any other objects added to the panel after it.
_____Begin test code_____
import java.awt.*;
public class BugReportv extends Frame
{
Panel panel1;
TextArea textarea;
List list;
Label label1;
Label label2;
TextField text1;
TextField text2;
int windowWidth = 450;
int windowHeight = 700;
public BugReportv(String args[])
{
super("Bug Reportv.JimmiChangedME");
panel1 = new Panel();
label1 = new Label("Label1:");
label1.setFont(new Font("Courier", Font.BOLD, 14));
panel1.add(label1);
text1 = new TextField("text1", 32);
panel1.add(text1);
label2 = new Label("Label2:");
label2.setFont(new Font("Courier", Font.BOLD, 14));
panel1.add(label2);
text2 = new TextField("text2", 32);
panel1.add(text2);
textarea = new TextArea(30, 50);
panel1.add(textarea);
add("Center", panel1);
//list = new List(10, false);
//add("South", list);
resize(windowWidth, windowHeight);
show();
}
public static void main(String args[])
{
new BugReportv(args);
}
}
This code example adds 2 fields and a TextArea to a Panel. Not exactly what I'd do but it should work. The problem is relatively minor- unless you're trying to type on the last line of the TextArea, since the last line is not visible and the second-to-last is only partly visible.
This one comes from a customer.
_____Begin Customer Data_____
What happens: In the attached program, a TextArea is added to a panel and
the panel is added to the frame. A List is added below the panel. Note
that the bottom anchor of the TextArea is obscured by the List; changing
the size of the visible part of the list has no effect.
Thanks for looking into this!
Robert Uomini
>From: ###@###.### (Robert Uomini)
_____End Customer Data_____
In the code below I have removed the List for clarity- the bottom of the TextArea is still not visible even without any other objects added to the panel after it.
_____Begin test code_____
import java.awt.*;
public class BugReportv extends Frame
{
Panel panel1;
TextArea textarea;
List list;
Label label1;
Label label2;
TextField text1;
TextField text2;
int windowWidth = 450;
int windowHeight = 700;
public BugReportv(String args[])
{
super("Bug Reportv.JimmiChangedME");
panel1 = new Panel();
label1 = new Label("Label1:");
label1.setFont(new Font("Courier", Font.BOLD, 14));
panel1.add(label1);
text1 = new TextField("text1", 32);
panel1.add(text1);
label2 = new Label("Label2:");
label2.setFont(new Font("Courier", Font.BOLD, 14));
panel1.add(label2);
text2 = new TextField("text2", 32);
panel1.add(text2);
textarea = new TextArea(30, 50);
panel1.add(textarea);
add("Center", panel1);
//list = new List(10, false);
//add("South", list);
resize(windowWidth, windowHeight);
show();
}
public static void main(String args[])
{
new BugReportv(args);
}
}
- duplicates
-
JDK-1244076 TextArea.preferredSize(rows, cols) doesn't allocate extra room for scrollbars
-
- Closed
-