import javax.swing.*;
public class button {
public static void main(String[] args) {
JFrame frame = new JFrame;
frame.setSize(400, 400);
frame.setVisible(true);
frame.setLayout(null);
//create button
JButton btn = new JButton("ok");
btn.setBounds(150, 200, 50, 50); // Properties of button, size, x, and y.
//append button to frame
frame.add(btn);
}}