五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊

qq

2023-06-09 15:16 作者:福樂哦  | 我要投稿

import javax.swing.JFrame; import java.awt.*; import java.awt.Color; import javax.swing.*; public class QQ extends JFrame{ JLabel L1,L2,L3,L4; JTextField input1; JPasswordField input2; JCheckBox fxk1,fxk2; JButton btn1; JPanel mb1,mb2,mb3,mb4,mb5,mb_c; public static void main(String[] args) { QQ a=new QQ(); } public QQ() { L1=new JLabel("QQ號(hào)碼",JLabel.CENTER); L1.setFont(new Font("微軟雅黑",Font.PLAIN,16)); L1.setForeground(new Color(0,0,0)); //設(shè)置字體顏色 L2=new JLabel("密碼",JLabel.CENTER); L2.setFont(new Font("微軟雅黑",Font.PLAIN,16)); L2.setForeground(new Color(0,0,0)); L3=new JLabel("找回密碼"); L3.setFont(new Font("微軟雅黑",Font.PLAIN,14)); L3.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));//鼠標(biāo)移動(dòng)到L3上變?yōu)槭种? ImageIcon img1=new ImageIcon("image/label1.jpg"); img1.setImage(img1.getImage().getScaledInstance(550, 150,Image.SCALE_DEFAULT));//設(shè)置圖片大小 L4=new JLabel(img1); input1=new JTextField(16); input2=new JPasswordField(16); fxk1=new JCheckBox("自動(dòng)登錄"); fxk1.setFont(new Font("微軟雅黑",Font.PLAIN,14)); fxk2=new JCheckBox("記住密碼"); fxk2.setFont(new Font("微軟雅黑",Font.PLAIN,14)); btn1=new JButton(new ImageIcon("image/login.jpg")); mb1=new JPanel(); mb2=new JPanel(); mb3=new JPanel(); mb4=new JPanel(); mb5=new JPanel(); mb_c=new JPanel(); mb1.add(L4); mb_c.setLayout(new GridLayout(3,1)); mb2.add(L1); mb2.add(input1); mb3.add(L2); mb3.add(input2); mb4.add(fxk1); mb4.add(fxk2); mb4.add(L3); mb_c.add(mb2);mb_c.add(mb3);mb_c.add(mb4); mb5.add(btn1); this.setLayout(new BorderLayout()); this.add(mb1,BorderLayout.NORTH); this.add(mb_c,BorderLayout.CENTER); this.add(mb5,BorderLayout.SOUTH); this.setIconImage((new ImageIcon("image/QQ.png")).getImage()); this.setTitle("QQ"); this.setSize(550,430); this.setLocation(1000, 500); this.setResizable(false); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setVisible(true); } } import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class LoginFrame extends JFrame implements ActionListener { ??private JLabel labelAccount, labelPassword; ??private JTextField textFieldAccount; ??private JPasswordField passwordField; ??private JButton buttonLogin; ??public LoginFrame() { ????setTitle("QQ Login"); ????setSize(300, 150); ????setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ????setLocationRelativeTo(null); ????// 創(chuàng)建組件 ????labelAccount = new JLabel("Account:"); ????labelPassword = new JLabel("Password:"); ????textFieldAccount = new JTextField(); ????passwordField = new JPasswordField(); ????buttonLogin = new JButton("Login"); ????// 設(shè)置布局 ????setLayout(new GridLayout(3, 2)); ????// 添加組件 ????add(labelAccount); ????add(textFieldAccount); ????add(labelPassword); ????add(passwordField); ????add(new JPanel()); ????add(buttonLogin); ????// 添加事件監(jiān)聽器 ????buttonLogin.addActionListener(this); ????// 顯示窗口 ????setVisible(true); ??} ??@Override ??public void actionPerformed(ActionEvent e) { ????if (e.getSource() == buttonLogin) { ??????// 登錄驗(yàn)證代碼 ??????String account = textFieldAccount.getText(); ??????String password = new String(passwordField.getPassword()); ??????if (account.equals("admin") && password.equals("123456")) { ????????JOptionPane.showMessageDialog(null, "Login success!"); ????????dispose(); // 關(guān)閉當(dāng)前窗口 ????????new FriendListFrame(); // 打開好友列表窗口 ??????} else { ????????JOptionPane.showMessageDialog(null, "Account or password is incorrect!"); ??????} ????} ??} ??public static void main(String[] args) { ????new LoginFrame(); ??} } import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class FriendListFrame extends JFrame implements ActionListener { ??private JList listFriends; ??private JButton buttonAdd, buttonDelete; ??public FriendListFrame() { ????setTitle("Friend List"); ????setSize(300, 200); ????setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ????setLocationRelativeTo(null); ????// 創(chuàng)建組件 ????listFriends = new JList<>(new String[]{"John", "Tom", "Lucy", "Jane"}); ????buttonAdd = new JButton("Add"); ????buttonDelete = new JButton("Delete"); ????// 設(shè)置布局 ????setLayout(new BorderLayout()); ????// 添加組件 ????add(new JScrollPane(listFriends), BorderLayout.CENTER); ????JPanel panelButtons = new JPanel(); ????panelButtons.add(buttonAdd); ????panelButtons.add(buttonDelete); ????add(panelButtons, BorderLayout.SOUTH); ????// 添加事件監(jiān)聽器 ????buttonAdd.addActionListener(this); ????buttonDelete.addActionListener(this); ????// 顯示窗口 ????setVisible(true); ??} ??@Override ??public void actionPerformed(ActionEvent e) { ????if (e.getSource() == buttonAdd) { ??????String name = JOptionPane.showInputDialog("Input friend name:"); ??????if (name != null && !name.trim().isEmpty()) { ????????DefaultListModel model = (DefaultListModel) listFriends.getModel(); ????????model.addElement(name); ??????} ????} else if (e.getSource() == buttonDelete) { ??????int[] indices = listFriends.getSelectedIndices(); ??????if (indices.length > 0) { ????????DefaultListModel model = (DefaultListModel) listFriends.getModel(); ????????for (int i = indices.length - 1; i >= 0; i--) { ??????????model.remove(indices[i]); ????????} ??????} ????} ??} ??public static void main(String[] args) { ????new FriendListFrame(); ??} }

qq的評(píng)論 (共 條)

分享到微博請遵守國家法律
惠安县| 沁水县| 乐昌市| 高邮市| 湘西| 温泉县| 贵港市| 东兰县| 施秉县| 澎湖县| 芦溪县| 武平县| 井陉县| 行唐县| 普宁市| 榕江县| 墨竹工卡县| 洮南市| 龙海市| 若尔盖县| 浦北县| 西畴县| 台南市| 河东区| 宁国市| 正蓝旗| 仁化县| 尼木县| 阳江市| 阿克陶县| 团风县| 古浪县| 织金县| 来宾市| 中西区| 怀化市| 泗水县| 阜南县| 精河县| 江口县| 平安县|