Skip to content

Commit 2f5750d

Browse files
hansonrhansonr
authored andcommitted
3.2.4.05 (b) update for broken tab pane, primarily
1 parent b1d285b commit 2f5750d

7 files changed

Lines changed: 10373 additions & 10365 deletions

File tree

2.6 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20181216134306
1+
20181217163947
2.6 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20181216134306
1+
20181217163947
2.6 KB
Binary file not shown.

sources/net.sf.j2s.java.core/src/javax/swing/SwingUtilities.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,10 +1014,15 @@ private static String layoutCompoundLabelImpl(
10141014
(int) v.getPreferredSpan(View.X_AXIS));
10151015
textR.height = (int) v.getPreferredSpan(View.Y_AXIS);
10161016
} else {
1017-
Dimension d = ui.getHTMLSize(ui.textNode);
1018-
textR.width = d.width;
1019-
textR.height = d.height;
1020-
// Take into account the left and right side bearings.
1017+
if (ui.textNode == null) {
1018+
textR.width = fm.stringWidth(text);
1019+
textR.height = fm.getHeight();
1020+
} else {
1021+
Dimension d = ui.getHTMLSize(ui.textNode);
1022+
textR.width = d.width;
1023+
textR.height = d.height;
1024+
}
1025+
// Take into account the left and right side bearings.
10211026
// This gives more space than it is actually needed,
10221027
// but there are two reasons:
10231028
// 1. If we set the width to the actual bounds,

0 commit comments

Comments
 (0)