Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.AWTException;
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Cursor;
import java.awt.Frame;
import java.awt.HeadlessException;

public class Main {
    public static void main(String[] args) throws HeadlessException, AWTException {
        Frame frame = new Frame();
        Button button1 = new Button("Ok");
        frame.add(button1, BorderLayout.NORTH);
        frame.setSize(50, 55);
        frame.setVisible(true);

        button1.setCursor(Cursor.getSystemCustomCursor("MoveDrop.32x32"));
    }
}