Duplicate :
|
|
Duplicate :
|
|
Relates :
|
Mouse drag action on TextArea component causes characters to disappear. The problem was reproduced on Windows XP SP2 (x86 Japanese) and Windows Vista (x86 Traditional Chinese/Japanese), using Java 1.6.0-b105 and 1.5.0_11. Test instruction is as follows: 1. Compile and run attached testcase (TextAreaTest.java) 2. Click TextArea and move caret to right side of "z" 3. Move mouse cursor to right side of "z" and click right mouse button and keep it and move it to right side. (It's drag action) 4. If mouse cursor is on vertical scrollbar, "a" is disappeared on TextArea. <== PROBLEM 5. Resize TextAreaTest window to activate horizontal scrollbar 6. Resize TextAreaTest window bigger than before (At this time, horizontal scrollbar should be deactivated) 7. Move mouse cursor to right side of "z" and click right mouse button and keep it and move it to right side. 8. If mouse cursor is on vertical scrollbar, several characters disappear on TextArea. <== PROBLEM (At this time, horizontal scrollbar is not activated) ============================================================ import java.awt.*; import java.awt.event.*; class TextAreaTest extends Frame { TextAreaTest() { add(new TextArea("abcdefghijklmnopqrstuvwxyz", 3, 30)); pack(); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); setVisible(true); } public static void main(String[] args) { new TextAreaTest(); } }
|