Skip to content

Instantly share code, notes, and snippets.

@rishi93
Created November 11, 2015 06:37
Show Gist options
  • Save rishi93/4fcff2ed1329dd8b033a to your computer and use it in GitHub Desktop.
Save rishi93/4fcff2ed1329dd8b033a to your computer and use it in GitHub Desktop.
Swing Basic Example
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class MyFrame extends JFrame
{
public MyFrame()
{
this.setTitle("Example Application");
this.setSize(400,400);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
}
}
class MyApp
{
public MyApp()
{
MyFrame myframe = new MyFrame();
myframe.setVisible(true);
}
}
public class test
{
public static void main(String args[])
{
MyApp myapp = new MyApp();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment