Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.Font;
import java.awt.Graphics;

import javax.swing.JFrame;

public class Main extends JFrame {

    public static void main(String[] a) {
        Main f = new Main();
        f.setSize(300, 300);
        f.setVisible(true);
    }

    public void paint(Graphics g) {
        Font f = g.getFont();

        System.out.println(f.hashCode());

        g.drawString("java2s.com", 4, 16);
    }
}