-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JTable] text shifts up when start editing and rowHeight is odd #126
Comments
Does this happen with the default font size or only a specific one? I'm not getting this behaviour in windows with the default size. |
This happens with the default font in macOS. |
I've removed |
What baseline does the macOS system font have for standard text characters i.e. |
|
How about the font height? I suspect that the issue is that the font is generally shifted in textfields with odd height. |
Font f = defaults.getFont("Table.font");
System.out.println("f = " + f);
System.out.println("font.getBaselineFor('a') = " + f.getBaselineFor('a'));
System.out.println(
"FontDesignMetrics.getMetrics(font).getHeight() = " + FontDesignMetrics.getMetrics(f).getHeight()); =>
|
Please add @Override
protected Rectangle getVisibleEditorRect() {
Rectangle rect = super.getVisibleEditorRect();
System.out.println(rect);
return rect;
} in |
|
Is the issue still occurring? When increasing the rowHeight in |
Test case:
Add the following to
TableDemo
Try editing the cells
Actual results: text in editable fields moves up by 1px or so.
Just in case you wonder: JMeter adjusts
rowHeight
based on the font size and zoom level. At certain zoom levels the computedrowHeight
becomes odd.The text was updated successfully, but these errors were encountered: