Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.swing.JFrame;
import javax.swing.JLabel;

public class Main {
    public static void main(String[] args) {
        JFrame frame = new JFrame("Hello!!");
        frame.setAlwaysOnTop(true);
        frame.setLocationByPlatform(true);
        frame.add(new JLabel("  Always visible"));
        frame.pack();
        frame.setVisible(true);
    }
}