Skip to content

Commit 9c213ef

Browse files
hansonrhansonr
authored andcommitted
removing unnecessary layout manager call in JSPanelUI.getMinimumSize()
1 parent f939389 commit 9c213ef

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSPanelUI.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package swingjs.plaf;
22

33

4+
import java.awt.Component;
45
import java.awt.Dimension;
6+
import java.awt.Insets;
57
import java.awt.LayoutManager;
68

79
import javax.swing.JComponent;
@@ -59,8 +61,11 @@ public Dimension getPreferredSize(JComponent jc) {
5961

6062
@Override
6163
public Dimension getMinimumSize(JComponent jc) {
62-
LayoutManager man = jc.getLayout();
63-
return (man == null ? super.getMinimumSize(jc) : jc.getLayout().minimumLayoutSize(jc));
64+
return null;
65+
// // in our capacity as peer here, not UI.
66+
// LayoutManager man = jc.getLayout();
67+
// Dimension d = (man == null ? super.getMinimumSize(jc) : jc.getLayout().minimumLayoutSize(jc));
68+
// return d;
6469
}
6570

6671

0 commit comments

Comments
 (0)