Skip to content

Commit 8b4131d

Browse files
hansonrhansonr
authored andcommitted
JApplet validate/invalidate needs to pass to content pane
or the root pane will be transfered out of DOM.
1 parent 334a72b commit 8b4131d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

sources/net.sf.j2s.java.core/src/java/awt/Container.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,7 @@ void setClientSize(int w, int h) {
15951595
* @see #doLayout
15961596
* @see #validate
15971597
*/
1598-
protected void validateTree() {
1598+
public void validateTree() {
15991599
if (!isValid()) {
16001600
if (peer instanceof ContainerPeer) {
16011601
((ContainerPeer)peer).beginLayout();

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,16 @@ public void repaintNow() {
577577
repaint(100, 0, 0, getWidth(), getHeight());
578578
}
579579

580+
@Override
581+
public void validateTree() {
582+
// otherwise
583+
getContentPane().validateTree();
584+
}
585+
586+
@Override
587+
public void invalidate() {
588+
getContentPane().invalidate();
589+
}
580590
/**
581591
* Returns a string representation of this JApplet. This method
582592
* is intended to be used only for debugging purposes, and the

0 commit comments

Comments
 (0)