Created
September 1, 2021 17:06
-
-
Save micycle1/c5cb69fa3854075ecd5e24305b8e0e0e to your computer and use it in GitHub Desktop.
Make java.applet.Applet runnable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class T2Q extends java.applet.Applet { | |
public static void main(String[] args) { | |
T2Q applet = new T2Q(); | |
applet.init(); | |
applet.start(); | |
// Create a window (JFrame) and make applet the content pane. | |
javax.swing.JFrame window = new javax.swing.JFrame("T2Q"); | |
window.setContentPane(applet); | |
window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); | |
window.pack(); // Arrange the components. | |
window.setVisible(true); // Make the window visible. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment