import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class gui extends JFrame {
JPanel mypanel;
JButton mybutton;
JLabel mylable;
public static void main(String[] args) {
gui frist = new gui();
frist.setTitle("First");
frist.setSize(300, 200);
frist.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frist.setVisible(true);
}
public gui() {
mypanel = new JPanel();
mybutton = new JButton("OK");
mylable = new JLabel();
mypanel.add(mybutton);
mypanel.add(mylable);
this.add(mypanel);
}
}
วันพฤหัสบดีที่ 1 พฤษภาคม พ.ศ. 2557
JAVA GUI (Graphical User Interface)
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)

ไม่มีความคิดเห็น:
แสดงความคิดเห็น