OK CANCEL

Jumat, 21 Oktober 2011

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);
    }
}

OUTPUT:

Get This Comment Form

0 comment(s):

 
Copyright© 2010 Felisitas Brillianti | Semelekete Weleh Weleh | http://dr214ac.blogspot.com