Skip to content

Commit 1af085f

Browse files
hansonrhansonr
authored andcommitted
fixing panel should be overflow:hidden
1 parent 289d9a6 commit 1af085f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ public void setDraggable(JSFunction f) {
335335
* panels
336336
*
337337
*/
338-
protected boolean isContainer, isWindow, isRootPane, isContentPane;
338+
protected boolean isContainer, isWindow, isRootPane, isContentPane, isPanel;
339339

340340
/**
341341
* linked nodes of this class
@@ -1085,7 +1085,7 @@ protected DOMNode setHTMLElementCUI() {
10851085
int h = getContainerHeight();
10861086
DOMNode.setSize(outerNode, w, h);
10871087
// not clear why this does not always work:
1088-
if (isContentPane)
1088+
if (isContentPane || isPanel)
10891089
DOMNode.setStyles(outerNode, "overflow", "hidden");
10901090
}
10911091
if (isRootPane) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class JSPanelUI extends JSLightweightUI {
1313

1414
int frameZ = 10000;
1515
public JSPanelUI() {
16-
isContainer = true;
16+
isContainer = isPanel = true;
1717
setDoc();
1818
}
1919

0 commit comments

Comments
 (0)