-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.1, 1.1.6, 1.2.0
-
x86, sparc
-
solaris_2.5.1, windows_95
Name: rk38400 Date: 05/14/98
In Windows 95, when using a file larger than 300k, the background color of the JTextArea becomes gray and the screen
will get painted with various false images randomly(when clicked with the mouse or selected for cut and paste).
The next repaint will paint correctly the screen, but the screen gets messed up again using mouse clicks and drags.
This same code behaves correctly with any size file in NT. The following is a sample code:
Reader rdr = null;
File f = new File("x.txt");
try {
rdr = new FileReader(f);
} catch (Exception e){
}
try{
DefaultEditorKit ek = new DefaultEditorKit();
JTextArea textArea = new JTextArea();
textArea.setBorder(new EmptyBorder(0,0,0,0));
if (rdr != null){
ek.read(rdr, textArea.getDocument(), 0);
}
JScrollPane scroller = new JScrollPane() {
public float getAlignmentX() {
return LEFT_ALIGNMENT;
}
};
scroller.getViewport().add(textArea);
textArea.setFont(new Font("Courier", Font.PLAIN, 12));
textArea.setEditable(false);
add(scroller, BorderLayout.CENTER);
} catch (Exception ex) {
}
(Review ID: 27511)
======================================================================
An easy way to reproduce this is to load /etc/termcap into the Swing
Notepad example and scroll down to the bottom.
timothy.prinzing@eng 1998-10-21
- duplicates
-
JDK-4129776 JTextPane not working with a large file
-
- Closed
-
-
JDK-4167785 new JTextArea(2000,100) - bad painting
-
- Closed
-
-
JDK-4174948 JEditorPane, JTextPane rendering has problems with files > 100k
-
- Closed
-