-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.2.2
-
x86
-
windows_nt
Name: rmT116609 Date: 01/05/2001
java version "1.2.2"
Classic VM (build JDK-1.2.2-001, native threads, symcjit)
This problem is specific to the swing windows look and feel only.
Fill up a JTextfield with a lot of text so that the length of text exceeds the
viewable area. Now scroll left and right and the repaint does not occur
correctly. There are instances when you can see two carets. One is the real
caret and the other one is the a defect in painting.
Run the attached program and scroll all the way right and all the way left
continuosly to see the defect.
........
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Frame2 extends JFrame {
JPanel contentPane;
JPanel jPanel1 = new JPanel();
JTextField jTextField1 = new JTextField(10);
public static void main(String[] args){
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception e) {
e.printStackTrace();
}
Frame2 frame = new Frame2();
frame.validate();
frame.setVisible(true);
}
public Frame2() {
contentPane = (JPanel) this.getContentPane();
contentPane.setLayout(new BorderLayout());
this.setSize(new Dimension(400, 300));
jTextField1.setText("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
this.setTitle("Frame Title");
contentPane.add(jPanel1, BorderLayout.CENTER);
jPanel1.add("North",jTextField1);
}
}
(Review ID: 114674)
======================================================================
- duplicates
-
JDK-4302796 Caret is echoed when scrolling in a full JTextField
-
- Resolved
-