-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.2.0
-
x86
-
windows_nt
Name: dbT83986 Date: 03/22/99
java.awt.Textarea does a left alignment with text that contains spaces at beginning.? ( Only on NT 4.0, )
The program prints "hello" on 2nd row and 6th col on win95.
On NT it prints a "hello" at 2nd row and zero col.
import java.awt.*;
class text extends java.awt.Frame{
private java.awt.Panel ivjContentsPane = null;
private java.awt.TextArea ivjTextArea1 = null;
public text(){
init();
}
public void init(){
ivjTextArea1 = new java.awt.TextArea("",24,80,java.awt.TextArea.SCROLLBARS_VERTICAL_ONLY);
Font font = new Font("Courier",Font.PLAIN,12);// nt temp version
ivjTextArea1.setFont(font);
ivjTextArea1.setBackground(Color.blue);
ivjTextArea1.setForeground(Color.white);
ivjTextArea1.setEditable(true);
ivjContentsPane = new java.awt.Panel();
ivjContentsPane.setName("ContentsPane");
ivjContentsPane.setLayout(new java.awt.BorderLayout());
ivjContentsPane.add(ivjTextArea1, "Center");
String out = "";
for(int i = 0;i<85; i++){
out+= " ";
}
out += "hello";
ivjTextArea1.append(out);
add(ivjContentsPane, "Center");
}
public static void main(java.lang.String[] args) {
try {
text t;
t = new text();
t.setVisible(true);
t.pack();
} catch (Throwable exception) {
System.err.println("Exception occurred in main() of java.awt.Frame");
//exception.printStackTrace(System.out);
System.exit(1);
}
}
}
(Review ID: 55731)
======================================================================