public class coba1 extends JFrame {
public coba1() {
setSize(100, 200);
this.setLocation(100,
300);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setBackground(Color.red);
JButton buttonOK = new
JButton();
buttonOK.setText("OK");
JButton buttonCancel =
new JButton();
buttonCancel.setText("CANCEL");
this.setLayout(new
FlowLayout());
this.add(buttonOK);
this.add(buttonCancel);
}
public static void
main(String[] args) {
coba1 coba = new coba1();
coba.setVisible(true);
}
0 comment(s):