您好,登錄后才能下訂單哦!
用java仿制qq
直奔主題,代碼如下
import java.awt.Color;
import java.awt.Container;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
public class GUIQQ extends JFrame {
// 用戶名
private JTextField username;
// 密碼
private JPasswordField password;
// 小容器
private JLabel jl1;
private JLabel jl2;
private JLabel jl3;
private JLabel jl4;
// 小按鈕
private JButton bu1;
private JButton bu2;
private JButton bu3;
// 復(fù)選框
private JCheckBox jc1;
private JCheckBox jc2;
// 列表框
private JComboBox jcb;
/*
String sql ="secelt * from while name='"username"'and psw'"=userpassword'"";
JOptionPane.showConfirmDialog(null,"您輸入的用戶名是"+getName);
}
}
});
jl1.add(jl2);
jl1.add(jl3);
jl1.add(jl4);
jl1.add(jc1);
jl1.add(jc2);
jl1.add(jcb);
jl1.add(bu1);
con.add(jl1);
con.add(username);
con.add(password);
}
public static void main(String[] args) {
// 實(shí)例化對象
GUIQQ qq = new GUIQQ();
}
}
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。