Skip to content

Commit 1d48161

Browse files
author
duke
committed
Backport 7d1bbff076c063d066951eedb21de7e694e588b3
1 parent 247815b commit 1d48161

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

test/jdk/sanity/client/lib/SwingSet2/src/DemoModule.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,6 @@
3131
import javax.swing.BoxLayout;
3232
import javax.swing.Icon;
3333
import javax.swing.ImageIcon;
34-
import javax.swing.JApplet;
3534
import javax.swing.JFrame;
3635
import javax.swing.JPanel;
3736
import javax.swing.UIManager;
@@ -42,10 +41,8 @@
4241

4342
/**
4443
* A generic SwingSet2 demo module
45-
*
46-
* @author Jeff Dinkins
4744
*/
48-
public class DemoModule extends JApplet {
45+
public class DemoModule extends JPanel {
4946

5047
// The preferred size of the demo
5148
private int PREFERRED_WIDTH = 680;
@@ -214,10 +211,6 @@ public static void main(String[] args) {
214211
demo.mainImpl();
215212
}
216213

217-
public void init() {
218-
getContentPane().setLayout(new BorderLayout());
219-
getContentPane().add(getDemoPanel(), BorderLayout.CENTER);
220-
}
221-
222214
void updateDragEnabled(boolean dragEnabled) {}
223-
}
215+
}
216+

0 commit comments

Comments
 (0)