importjava.awt.Container;importjava.awt.Image;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjavax.swing.ImageIcon;importjavax.swing.JButton;i...
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 Main 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;
// 复选框
private JCheckBox jc1;
private JCheckBox jc2;
// 列表框
private JComboBox jcb;
public Main() {
// 设置窗口标题
this.setTitle("QQ2016正式版");
// 窗体组件初始化
init();
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// 设置布局方式为绝对定位
this.setLayout(null);
this.setBounds(0, 0, 355, 265);
// 设置窗体的标题图标
Image image = new ImageIcon("e:/a.gif").getImage();
this.setIconImage(image)
// 窗体大小不能改变
this.setResizable(false);
// 居中显示
this.setLocationRelativeTo(null);
// 窗体可见
this.setVisible(true);
}
http://outofmemory.cn/code-snippet/10179/JavaSwingQQ
完整的代码在这个网址 这个网址要实现点击多账号跳转到忘记密码页面
展开