Created
November 11, 2015 06:37
-
-
Save rishi93/4fcff2ed1329dd8b033a to your computer and use it in GitHub Desktop.
Swing Basic Example
This file contains hidden or 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
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