Skip to content

Instantly share code, notes, and snippets.

@micycle1
Created September 1, 2021 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micycle1/c5cb69fa3854075ecd5e24305b8e0e0e to your computer and use it in GitHub Desktop.
Save micycle1/c5cb69fa3854075ecd5e24305b8e0e0e to your computer and use it in GitHub Desktop.
Make java.applet.Applet runnable
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