Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- public class Test extends Object{
- static {
- executingClass();
- }
- private static void executingClass(){
- System.out.println("Creating a GUI.");
- JFrame frame = new JFrame("Test");
- frame.setSize(200, 200);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.setVisible(true);
- }
- public static void doSomethingElse(){
- System.out.println("Changing some variables...");
- }
- public static void main(String... args){
- // Doing nothing but the main method is requiered.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment