Other |
---|
1.3.0 kestrelFixed |
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
Name: diC59631 Date: 09/19/97 The code below calls TextArea.setText() with a large String. The constant STRING_SIZE determines how many lines of 10 bytes will make up the String. When STRING_SIZE is 5000 (ie a 50k String) the whole string is displayed. When STRING_SIZE is 6000 (ie a 60k String) nothing is displayed. ************************************************* import java.awt.*; class TextAreaSize extends Frame { /* Demonstrates the limit to the amount of text that can be displayed in a TextArea. When STRING_SIZE is 5000 (50K of text) all the text is displayed. When STRING_SIZE is 6000 (60K of text) NO text is displayed. */ static final int STRING_SIZE = 6000; public static void main(String[] args) { new TextAreaSize(); } TextAreaSize() { super("TextAreaSize Test Frame"); setSize(300,300); Panel pnl1 = new Panel(); add(pnl1); pnl1.setLayout(new BorderLayout()); TextArea textArea = new TextArea(); pnl1.add(textArea); setVisible(true); StringBuffer bigStringBuffer = new StringBuffer(); for(int i=0; i < STRING_SIZE; i++) { bigStringBuffer.append("123456789\n"); } textArea.setText(bigStringBuffer.toString()); System.out.println("String size=" + bigStringBuffer.toString().length()); } } ====================================================================== ronan.mandel@Eng 1997-11-04 Another Case: I am not sure it's the same as bug 4067898. For method replaceRange, insert, or append in class TextArea, after you use a big string as the parameter, you can only delete texts; you can not input texts. Here is the code: import java.awt.*; public class Test extends Frame { public Test(String title, String argv[]) { super(title); TextArea textArea = new TextArea(40, 30); textArea.setEditable(true); this.add("Center", textArea); String bigString = new String(); for (int i = 0; i < 1500; i++) bigString = bigString.concat(i+"abcdefghijklmnopqrstuvwxyz\n"); System.out.println("Replace String " + bigString); textArea.replaceRange(bigString, 0, textArea.getText().length()); } public static void main(String argv[]) { Test frame = new Test("Test", argv); frame.setSize(800, 600); frame.setVisible(true); } } ################# From the so#3175931 customer ############### Sun14Dec97-16:00 BELLEY The following is a summary of the issues we discussed yesterday evening about the problem that I have encountered when running my JAVA application with the SUN JRE versions 1.1.5 and 1.1.2 on the Windows 95 operating system, service order #3175931. The project that I am developing is soon to be released in Beta (Jan 16th). Our final release is scheduled for some time in February.While testing, it was discovered that when very large strings of text are placed in my java.awt.TextArea component using the setText() method, the text will not show in the text box. No errors are generated by the program when this happens. I browsed the SUN web site and found the "Bug Parade" page (http://developer.javasoft.com/developer/techDocs/knowledgebase.html). Searching on the "TextArea" keyword, I found several bug reports which are strikingly similar to my findings--specifically Bug Id 4080391. (The others are 4071955, 4064198, 4082558, 4061916, 4039177, and 4038047.) It appears that none of these bug reports are currently being investigated. I have discovered that when the text area is in read-only mode, I can get a little over 50,000 bytes of text to show. If the text area is in writable mode, I can add up to about 28,000 bytes before it stops accepting any more text. This problem occurs on Win95 but NOT on WinNT. It is my understanding that the Windows 95 operating system still uses 16-bit implementations in some of its lower level windowing routines, and I am suspecting that this is at the root of the problem. The completion of this product is very high priority for my company. We cannot release our product with this text box limitation as many of our customers will be running in the Win95 environment. It is important for me to know if SUN intends to pursue a fix or work-around for this problem, how soon I might be able to expect the fix/work-around. If a fix/work-around is not available, I will be forced to investigate Microsoft's JVM which is something that I really do not want to do. Please let me know if I can provide you with any other information. Sample test programs are provided by the authors of the previously mentioned Bug Id 4080391, so I have not included any. #########################
|