Guest User

Untitled

a guest
Apr 7th, 2013
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. import javax.swing.*;
  2.  
  3. public class Test extends Object{
  4.     static {
  5.         executingClass();
  6.     }
  7.    
  8.     private static void executingClass(){
  9.         System.out.println("Creating a GUI.");
  10.        
  11.         JFrame frame = new JFrame("Test");
  12.         frame.setSize(200, 200);
  13.         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  14.         frame.setVisible(true);
  15.     }
  16.    
  17.     public static void doSomethingElse(){
  18.         System.out.println("Changing some variables...");
  19.     }
  20.    
  21.     public static void main(String... args){
  22.         // Doing nothing but the main method is requiered.
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment