-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
1.1.5
-
sparc
-
solaris_2.5.1
-
Not verified
Name: akC57697 Date: 09/16/97
The com.sun.java.swing.text.DefaultStyledDocument throws unexpected
java.util.NoSuchElementException when inserts empty string.
Swing version is 0.4.1
-------------------Example-----------------------------------
import com.sun.java.swing.text.*;
import com.sun.java.swing.*;
public class TestSetText {
public static void main(String[] args) {
JTextComponent tc = new JTextComponent();
tc.setDocument(new DefaultStyledDocument());
try {
tc.setText("");
} catch (Exception e) {
System.out.println("Unexpected "+e);
return;
}
System.out.println("OK. No exceptions.");
}
}
-------------------Output------------------------------------
java TestSetText
Unexpected java.util.NoSuchElementException
======================================================================