-
Bug
-
Resolution: Duplicate
-
P1
-
None
-
1.2.0
-
x86
-
windows_95
JDK Version: 1.2beta3-L
OS: Windows 95
Locale: All
When using TextField, and TextArea default constructor to construct instance,
and set a certain number text in them, when recaculate their size, windows95
will closed the application. Following are two program to show thsi problem.
========================CheckWindows.java==================================
import java.awt.*;
public class CheckWindows {
TextField tf;
public static void main(String args[]) {
new CheckWindows();
}
public CheckWindows() {
Frame f = new Frame();
tf = new TextField();
f.add(tf);
String data = "";
for (int i = 0; i < 257; i++) {
data = data + "\u004a" + "\n";
}
tf.setText(data);
f.pack();
f.setVisible(true);
}
}
============================================================================
=======================CheckWindows2.java===================================
import java.awt.*;
import java.awt.event.*;
public class CheckWindows2 {
TextArea ta;
Frame f;
public static void main(String args[]) {
new CheckWindows2();
}
public CheckWindows2() {
f = new Frame();
ta = new TextArea();
f.add(ta);
f.pack();
f.setVisible(true);
addData();
}
public void addData() {
String data =
"1:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWDEFGHIJKLMNOPQRSTUVW\n"+
"1:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWDEFGHIJKLMNOPQRSTUVW\n"+
":;<=>?@ABCDEFGHIJKLMNOPQRSTUVWDEFGHIJKLMNOPQRSTUVW\n"+
":;<=>?@ABCDEFGHIJKLMNOPQRSTUVWDEFGHIJKLMNOPQRSTUVW\n"+
":;<=>?@ABCDEFGHIJKLMNOPQRSTUVWDEFGHIJKLMNOPQRSTUVW\n";
ta.setText(data);
f.dispose();
System.exit(0);
}
}
============================================================================
java CheckWindows application crash
java CheckWindows2 application crash.
jim.hu@prc 1998-03-11
OS: Windows 95
Locale: All
When using TextField, and TextArea default constructor to construct instance,
and set a certain number text in them, when recaculate their size, windows95
will closed the application. Following are two program to show thsi problem.
========================CheckWindows.java==================================
import java.awt.*;
public class CheckWindows {
TextField tf;
public static void main(String args[]) {
new CheckWindows();
}
public CheckWindows() {
Frame f = new Frame();
tf = new TextField();
f.add(tf);
String data = "";
for (int i = 0; i < 257; i++) {
data = data + "\u004a" + "\n";
}
tf.setText(data);
f.pack();
f.setVisible(true);
}
}
============================================================================
=======================CheckWindows2.java===================================
import java.awt.*;
import java.awt.event.*;
public class CheckWindows2 {
TextArea ta;
Frame f;
public static void main(String args[]) {
new CheckWindows2();
}
public CheckWindows2() {
f = new Frame();
ta = new TextArea();
f.add(ta);
f.pack();
f.setVisible(true);
addData();
}
public void addData() {
String data =
"1:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWDEFGHIJKLMNOPQRSTUVW\n"+
"1:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWDEFGHIJKLMNOPQRSTUVW\n"+
":;<=>?@ABCDEFGHIJKLMNOPQRSTUVWDEFGHIJKLMNOPQRSTUVW\n"+
":;<=>?@ABCDEFGHIJKLMNOPQRSTUVWDEFGHIJKLMNOPQRSTUVW\n"+
":;<=>?@ABCDEFGHIJKLMNOPQRSTUVWDEFGHIJKLMNOPQRSTUVW\n";
ta.setText(data);
f.dispose();
System.exit(0);
}
}
============================================================================
java CheckWindows application crash
java CheckWindows2 application crash.
jim.hu@prc 1998-03-11
- duplicates
-
JDK-4120876 java.awt.TextComponent.getText crashes if text length > 255 (win95)
-
- Closed
-