Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.Cursor;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;

public class Main extends JFrame {
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                Main mainForm = new Main();
                mainForm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                mainForm.setSize(250, 250);

                Cursor cursor = new Cursor(Cursor.HAND_CURSOR);
                mainForm.setCursor(cursor);

                mainForm.pack();
                mainForm.setVisible(true);
            }
        });
    }
}