Vїяġїи Ĝϋί£Ð
Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
บ้านLatest imagesสมัครสมาชิก(Register)เข้าสู่ระบบ(Log in)

 

 appcomponents

Go down 
ผู้ตั้งข้อความ
Angel-beats
ﻬ௫ﻬAdminﻬ௫ﻬ
ﻬ௫ﻬAdminﻬ௫ﻬ
Angel-beats


ชื่อในเกม : Novas
ค่าขยัน : 35
ค่าขนม : -4523
คะแนน : 0

appcomponents Empty
ตั้งหัวข้อเรื่อง: appcomponents   appcomponents Icon_minitime11/2/2014, 04:14

package appcomponents;
public class AppComponents extends javax.swing.JFrame{
public AppComponents(){
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
java.awt.Container con=getContentPane();
con.setLayout(null);
setBounds(150,200,400,500);
setVisible(true);

Labname=new javax.swing.JLabel("Hello New world!");
Labname.setBounds(50,30,140,30);
con.add(Labname);

txt1=new javax.swing.JTextField();
txt1.setBounds(170,30,140,30);
con.add(txt1);

btOK=new java.awt.Button("ok");
btOK.setBounds(170,80,140,30);
con.add(btOK);

btOK.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btOKActionPerformed(evt);
}
});

}
private void btOKActionPerformed(java.awt.event.ActionEvent evt) {
Labname.setText(txt1.getText())
}

public static void main(String[] args) {
new AppComponents();
}
private javax.swing.JLabel Labname;
private java.awt.Button btOK;
private javax.swing.JTextField txt1;
}
ขึ้นไปข้างบน Go down
http://virgin.wow3.info
 
appcomponents
ขึ้นไปข้างบน 
หน้า 1 จาก 1

Permissions in this forum:คุณไม่สามารถพิมพ์ตอบ
Vїяġїи Ĝϋί£Ð :: General Zone :: Java-
ไปที่: