-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.4.0
-
x86
-
windows_xp
Name: sv35042 Date: 10/08/2002
FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
FULL OPERATING SYSTEM VERSION : Microsoft Windows XP
[Version 5.1.2600]
ADDITIONAL OPERATING SYSTEMS : Windows NT/2000
A DESCRIPTION OF THE PROBLEM :
Since JDK 1.4 beta, when I click in my table cells to edit
(they use JTextFields for both editing and rendering) the
font size increases slightly. This shifts all the
characters to the right, and the insertion cursor is then
inserted in the wrong place!
This is very aggravating for users, as they watch the text
jump a little when they click in a table cell.
This seems to occur with all Windows versions, but did NOT
occur in 1.3.
REGRESSION. Last worked in version 1.3.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a table with JTextField editor and renderer.
2. Click in the text field to start editing.
3.
EXPECTED VERSUS ACTUAL BEHAVIOR :
I expect the cursor to be put between the two characters on
which I click, but since the font size changes, the cursor
gets inserted in the wrong place!
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
public class Test {
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName
());
JFrame frame = new JFrame("Bad Font Sizes in JTextField");
String[][] data = new String[][] { { "Looooooooooong Row
1", "Looooooooooong Value 1" }, { "Looooooooooong Row 2", "Looooooooooong Value
2" }};
JTable table = new JTable(data, new String[] { "Header
1", "Header 2" });
frame.getContentPane().add(table);
frame.pack();
frame.setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
Use JDK 1.3.
(Review ID: 143271)
======================================================================
- duplicates
-
JDK-4419964 Metal L&F should inherit font size from windows desktop
-
- Resolved
-