Absolute.java Source code

Java tutorial

Introduction

Here is the source code for Absolute.java

Source

import javax.swing.JButton;
import javax.swing.JFrame;

public class Absolute {
    public static void main(String[] args) {
        JFrame f = new JFrame();
        f.setLayout(null);

        JButton ok = new JButton("OK");
        ok.setBounds(50, 150, 80, 25);

        JButton close = new JButton("Close");
        close.setBounds(150, 150, 80, 25);

        f.add(ok);
        f.add(close);

        f.setSize(300, 250);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setVisible(true);
    }
}