<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
本文範例為大家分享了java+io+swing實現學生資訊管理系統的具體程式碼,供大家參考,具體內容如下
說明:
1.開發環境基於eclipse外加windowbuilder外掛。
2.採用io流持續儲存檔案到本地磁碟。
3.Arrylist對檔案資訊進行操作。
本地儲存學生資訊的txt檔案,可在此對學生資訊增刪改查但需要注意格式。
學生實體類
package stuManager; public class StuInfo { private int stuId;// 學號 private String stuName;// 姓名 private int stuAge;// 年齡 private String stuPrefession;// 專業 private int stuHomeNumber;// 宿舍 // Alt+Shift+S快速建立構造方法: public StuInfo() { } public StuInfo(int stuId, String stuName, int stuAge, String stuPrefession, int stuHomeNumber) { this.stuId = stuId; this.stuName = stuName; this.stuAge = stuAge; this.stuPrefession = stuPrefession; this.stuHomeNumber = stuHomeNumber; } public int getStuId() { return stuId; } public void setStuId(int stuId) { this.stuId = stuId; } public String getStuName() { return stuName; } public void setStuName(String stuName) { this.stuName = stuName; } public int getStuAge() { return stuAge; } public void setStuAge(int stuAge) { this.stuAge = stuAge; } public String getStuPrefession() { return stuPrefession; } public void setStuPrefession(String stuPrefession) { this.stuPrefession = stuPrefession; } public int getStuHomeNumber() { return stuHomeNumber; } public void setStuHomeNumber(int stuHomeNumber) { this.stuHomeNumber = stuHomeNumber; } }
學生資訊寫入本地磁碟txt檔案類
package stuManager; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import stuView.StuManagerFrm; public class ArrayListToFile { public static void main(String[] args) throws IOException { // 建立輸出緩衝流物件 BufferedWriter bw = new BufferedWriter(new FileWriter("e://a.txt")); for (int i = 0; i < StuManagerFrm.list.size(); i++) { //向txt檔案中寫入 bw.write(StuManagerFrm.list.get(i).getStuId() + "," + StuManagerFrm.list.get(i).getStuName() + "," + StuManagerFrm.list.get(i).getStuAge() + "," + StuManagerFrm.list.get(i).getStuPrefession() + "," + StuManagerFrm.list.get(i).getStuHomeNumber()); bw.newLine(); bw.flush(); } // 釋放資源 bw.close(); } }
讀取本地磁碟txt檔案資訊類
package stuManager; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import stuView.StuAdd; import stuView.StuManagerFrm; public class FileToArrayList { public static boolean a = true; public static void main(String[] args) throws IOException { // 建立一個輸入緩衝物件 BufferedReader br = new BufferedReader(new FileReader("e:\a.txt")); String line; while ((line = br.readLine()) != null) { // br.read.line讀一行 String[] strArray = line.split(","); StuInfo stu = new StuInfo(); stu.setStuId(Integer.parseInt(strArray[0])); stu.setStuName(strArray[1]); stu.setStuAge(Integer.parseInt(strArray[2])); stu.setStuPrefession(strArray[3]); stu.setStuHomeNumber(Integer.parseInt(strArray[4])); StuManagerFrm.list.add(stu); } // 釋放資源 br.close(); } }
刪除txt檔案所有資訊類
package stuManager; import java.io.*; public class ClearFile { //清空檔案內容 public static void clearInfoForFile(String fileName) { File file = new File("e:\a.txt"); try { if (!file.exists()) { file.createNewFile(); } FileWriter fileWriter = new FileWriter(file); fileWriter.write(""); fileWriter.flush(); fileWriter.close(); } catch (IOException e) { e.printStackTrace(); } } }
登陸表單(初始賬號:admin 密碼:123456)
package stuView; import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.JLabel; import javax.swing.JOptionPane; import java.awt.Font; import javax.swing.JTextField; import javax.swing.JPasswordField; import javax.swing.JButton; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.Color; public class StuLogin extends JFrame { static String user = "admin"; static int userPassword = 123456; static String userPassword0 = String.valueOf(userPassword); private JPanel contentPane; static JTextField textField; private JLabel lblNewLabel_2; static JPasswordField passwordField; private JButton btnNewButton; /** * 所有jframe表單借用eclipse外掛Windowbuilder繪製 * */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { StuLogin frame = new StuLogin(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ public StuLogin() { setTitle("登陸"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 409, 252); contentPane = new JPanel(); contentPane.setBackground(Color.LIGHT_GRAY); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JLabel lblNewLabel = new JLabel("u5B66u751Fu4FE1u606Fu7BA1u7406u7CFBu7EDF"); lblNewLabel.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel.setBounds(114, 28, 165, 35); contentPane.add(lblNewLabel); JLabel lblNewLabel_1 = new JLabel("u7528u6237u540D"); lblNewLabel_1.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_1.setBounds(28, 73, 76, 35); contentPane.add(lblNewLabel_1); textField = new JTextField(); textField.setBounds(114, 80, 136, 21); contentPane.add(textField); textField.setColumns(10); lblNewLabel_2 = new JLabel("u5BC6u7801"); lblNewLabel_2.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_2.setBounds(28, 129, 76, 35); contentPane.add(lblNewLabel_2); passwordField = new JPasswordField(); passwordField.setBounds(114, 136, 136, 21); contentPane.add(passwordField); btnNewButton = new JButton("u767Bu9646"); btnNewButton.setBackground(Color.LIGHT_GRAY); btnNewButton.addActionListener(new ActionListener() { // 登陸按鈕監聽 public void actionPerformed(ActionEvent e) { if (textField.getText().equals("admin") && passwordField.getText().equals(userPassword0)) { JOptionPane.showMessageDialog(null, "登陸成功!"); dispose(); StuManagerFrm.main(null); } else { JOptionPane.showMessageDialog(null, "賬號或密碼錯誤"); } } }); btnNewButton.setBounds(133, 182, 97, 23); contentPane.add(btnNewButton); } }
主介面
package stuView; import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import stuManager.StuInfo; import javax.swing.JMenuBar; import javax.swing.JMenu; import javax.swing.JMenuItem; import javax.swing.JOptionPane; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.List; import java.awt.event.ActionEvent; import javax.swing.JTextArea; import javax.swing.JScrollBar; import java.awt.ScrollPane; import javax.swing.JScrollPane; import java.awt.Color; public class StuManagerFrm extends JFrame { public static List<StuInfo> list = new ArrayList<StuInfo>();// 建立靜態型別的動態陣列,方便呼叫 private JPanel contentPane; //有關面板表單都設定為靜態,方便呼叫 static JFrame frame; static JPanel passwordChangePanel; static JPanel stuAddPanel; static JPanel stuQueryPanel; static JPanel stuUpdatePanel; static JPanel stuDeletePanel; static JTextArea textArea; static JPanel userInfoPanel; public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { frame = new StuManagerFrm(); frame.setResizable(false);// 表單不可放大 frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame.(由windowbuilder繪製) */ public StuManagerFrm() { setTitle("u5B66u751Fu4FE1u606Fu7BA1u7406u7CFBu7EDF"); setForeground(Color.WHITE); setBackground(Color.WHITE); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 672, 440); JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); JMenu mnNewMenu = new JMenu("u7528u6237u64CDu4F5C"); menuBar.add(mnNewMenu); JMenuItem mntmNewMenuItem = new JMenuItem("u4FEEu6539u5BC6u7801"); mntmNewMenuItem.addActionListener(new ActionListener() { // 完成修改密碼監聽 public void actionPerformed(ActionEvent e) { StuManagerFrm.frame.getContentPane().removeAll(); StuManagerFrm.frame.repaint(); JScrollPane scrollPane = new JScrollPane(); scrollPane.setBounds(228, 0, 424, 381); contentPane.add(scrollPane); textArea = new JTextArea(); scrollPane.setViewportView(textArea); passwordChangePanel = new UserNameChange(); passwordChangePanel.setBounds(0, 0, 230, 380); frame.getContentPane().add(passwordChangePanel); passwordChangePanel.updateUI(); } }); mnNewMenu.add(mntmNewMenuItem); JMenuItem mntmNewMenuItem_1 = new JMenuItem("u9000u51FAu767Bu5F55"); mntmNewMenuItem_1.addActionListener(new ActionListener() { // 完成退出登陸監聽: public void actionPerformed(ActionEvent e) { dispose(); JOptionPane.showMessageDialog(null, "退出成功請重新登陸!"); StuLogin.main(null); } }); mnNewMenu.add(mntmNewMenuItem_1); JMenuItem mntmNewMenuItem_8 = new JMenuItem("u7528u6237u4FE1u606F"); mntmNewMenuItem_8.addActionListener(new ActionListener() { // 使用者資訊監聽 public void actionPerformed(ActionEvent e) { //有關移除非選定的面板持續並顯示文字區(以下各個監聽同理) StuManagerFrm.frame.getContentPane().removeAll(); StuManagerFrm.frame.repaint(); JScrollPane scrollPane = new JScrollPane(); scrollPane.setBounds(228, 0, 424, 381); contentPane.add(scrollPane); textArea = new JTextArea(); scrollPane.setViewportView(textArea); //顯示當前選定元素對應的面板(以下各個監聽同理) userInfoPanel = new UserInfo(); userInfoPanel.setBounds(0, 0, 230, 380); frame.getContentPane().add(userInfoPanel); userInfoPanel.updateUI(); UserInfo.lblNewLabel_2.setText(StuLogin.user); UserInfo.lblNewLabel_2_1.setText(String.valueOf(StuLogin.userPassword0)); } }); mnNewMenu.add(mntmNewMenuItem_8); JMenu mnNewMenu_1 = new JMenu("u5B66u751Fu4FE1u606Fu64CDu4F5C"); menuBar.add(mnNewMenu_1); JMenuItem mntmNewMenuItem_2 = new JMenuItem("u6DFBu52A0u5B66u751Fu4FE1u606F"); mntmNewMenuItem_2.addActionListener(new ActionListener() { // 增添學生資訊監聽: public void actionPerformed(ActionEvent e) { StuManagerFrm.frame.getContentPane().removeAll(); StuManagerFrm.frame.repaint(); JScrollPane scrollPane = new JScrollPane(); scrollPane.setBounds(228, 0, 424, 381); contentPane.add(scrollPane); textArea = new JTextArea(); scrollPane.setViewportView(textArea); stuAddPanel = new StuAdd(); stuAddPanel.setBounds(0, 0, 230, 380); frame.getContentPane().add(stuAddPanel); stuAddPanel.updateUI(); } }); mnNewMenu_1.add(mntmNewMenuItem_2); JMenuItem mntmNewMenuItem_3 = new JMenuItem("u4FEEu6539u5B66u751Fu4FE1u606F"); mntmNewMenuItem_3.addActionListener(new ActionListener() { // 修改學生資訊監聽 public void actionPerformed(ActionEvent e) { StuManagerFrm.frame.getContentPane().removeAll(); StuManagerFrm.frame.repaint(); JScrollPane scrollPane = new JScrollPane(); scrollPane.setBounds(228, 0, 424, 381); contentPane.add(scrollPane); textArea = new JTextArea(); scrollPane.setViewportView(textArea); stuUpdatePanel = new StuUpdate(); stuUpdatePanel.setBounds(0, 0, 227, 380); frame.getContentPane().add(stuUpdatePanel); stuUpdatePanel.updateUI(); } }); mnNewMenu_1.add(mntmNewMenuItem_3); JMenuItem mntmNewMenuItem_4 = new JMenuItem("u67E5u8BE2u5B66u751Fu4FE1u606F"); mntmNewMenuItem_4.addActionListener(new ActionListener() { // 查詢學生資訊監聽: public void actionPerformed(ActionEvent e) { StuManagerFrm.frame.getContentPane().removeAll(); StuManagerFrm.frame.repaint(); JScrollPane scrollPane = new JScrollPane(); scrollPane.setBounds(228, 0, 424, 381); contentPane.add(scrollPane); textArea = new JTextArea(); scrollPane.setViewportView(textArea); stuQueryPanel = new StuQuery(); stuQueryPanel.setBounds(0, 0, 230, 380); frame.getContentPane().add(stuQueryPanel); stuQueryPanel.updateUI(); } }); mnNewMenu_1.add(mntmNewMenuItem_4); JMenuItem mntmNewMenuItem_5 = new JMenuItem("u5220u9664u5B66u751Fu4FE1u606F"); mntmNewMenuItem_5.addActionListener(new ActionListener() { // 刪除學生資訊監聽: public void actionPerformed(ActionEvent e) { StuManagerFrm.frame.getContentPane().removeAll(); StuManagerFrm.frame.repaint(); JScrollPane scrollPane = new JScrollPane(); scrollPane.setBounds(228, 0, 424, 381); contentPane.add(scrollPane); textArea = new JTextArea(); scrollPane.setViewportView(textArea); stuDeletePanel = new StuDelete(); stuDeletePanel.setBounds(0, 0, 230, 380); frame.getContentPane().add(stuDeletePanel); stuDeletePanel.updateUI(); } }); mnNewMenu_1.add(mntmNewMenuItem_5); JMenu mnNewMenu_2 = new JMenu("u5173u4E8Eu4F5Cu8005"); menuBar.add(mnNewMenu_2); JMenuItem mntmNewMenuItem_6 = new JMenuItem("u8054u7CFBu6211u4EEC"); mntmNewMenuItem_6.addActionListener(new ActionListener() { // 關於作者部分監聽 public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(null, "電話:" + "110"); } }); mnNewMenu_2.add(mntmNewMenuItem_6); JMenuItem mntmNewMenuItem_7 = new JMenuItem("u8054u7CFBu5730u5740"); mntmNewMenuItem_7.addActionListener(new ActionListener() { // 聯絡地址監聽 public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(null, "地址:" + "公安局"); } }); mnNewMenu_2.add(mntmNewMenuItem_7); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); // 向表單新增文字區並新增滑輪 JScrollPane scrollPane = new JScrollPane(); scrollPane.setBounds(228, 0, 424, 381); contentPane.add(scrollPane); textArea = new JTextArea(); scrollPane.setViewportView(textArea); } }
修改密碼面板
package stuView; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPasswordField; import java.awt.Font; import javax.swing.JButton; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.Color; public class UserNameChange extends JPanel { private JPasswordField passwordField; /** * Create the panel. */ public UserNameChange() { setBackground(Color.LIGHT_GRAY); setLayout(null); JLabel lblNewLabel = new JLabel("u8BF7u8F93u5165u5BC6u7801uFF1A"); lblNewLabel.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel.setBounds(0, 73, 99, 32); add(lblNewLabel); passwordField = new JPasswordField(); passwordField.setBounds(83, 79, 122, 21); add(passwordField); JLabel lblNewLabel_1 = new JLabel("u4FEEu6539u5BC6u7801"); lblNewLabel_1.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_1.setBounds(0, 10, 122, 32); add(lblNewLabel_1); JButton btnNewButton = new JButton("u786Eu5B9A"); btnNewButton.setBackground(Color.LIGHT_GRAY); btnNewButton.addActionListener(new ActionListener() { // 確定修改密碼監聽 public void actionPerformed(ActionEvent e) { StuLogin.userPassword0 = passwordField.getText(); StuManagerFrm.frame.dispose(); JOptionPane.showMessageDialog(null, "修改成功,請重新登陸!"); StuLogin.main(null); } }); btnNewButton.setBounds(0, 127, 77, 23); add(btnNewButton); JButton btnNewButton_1 = new JButton("u53D6u6D88"); btnNewButton_1.setBackground(Color.LIGHT_GRAY); btnNewButton_1.addActionListener(new ActionListener() { // 取消修改密碼監聽 public void actionPerformed(ActionEvent e) { // 刪除修改密碼面板 StuManagerFrm.frame.getContentPane().remove(StuManagerFrm.passwordChangePanel); // 重畫視窗 StuManagerFrm.frame.repaint(); } }); btnNewButton_1.setBounds(128, 127, 77, 23); add(btnNewButton_1); } }
使用者資訊面板
package stuView; import javax.swing.JPanel; import javax.swing.JLabel; import java.awt.Font; import java.awt.Color; public class UserInfo extends JPanel { static JLabel lblNewLabel_2; static JLabel lblNewLabel_2_1; /** * Create the panel. */ public UserInfo() { setBackground(Color.LIGHT_GRAY); setLayout(null); JLabel lblNewLabel = new JLabel("u5F53u524Du7528u6237u4FE1u606F"); lblNewLabel.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel.setBounds(10, 10, 114, 31); add(lblNewLabel); JLabel lblNewLabel_1 = new JLabel("u7528u6237u540DuFF1A"); lblNewLabel_1.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_1.setBounds(10, 79, 95, 31); add(lblNewLabel_1); JLabel lblNewLabel_1_1 = new JLabel("u5BC6 u7801uFF1A"); lblNewLabel_1_1.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_1_1.setBounds(10, 156, 95, 31); add(lblNewLabel_1_1); lblNewLabel_2 = new JLabel("New label"); lblNewLabel_2.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_2.setBounds(81, 83, 93, 23); add(lblNewLabel_2); lblNewLabel_2_1 = new JLabel("New label"); lblNewLabel_2_1.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_2_1.setBounds(81, 160, 93, 23); add(lblNewLabel_2_1); } }
新增學生資訊面板
package stuView; import javax.swing.JPanel; import java.awt.Color; import javax.swing.JLabel; import javax.swing.JOptionPane; import java.awt.Font; import javax.swing.JTextField; import stuManager.ArrayListToFile; import stuManager.FileToArrayList; import stuManager.StuInfo; import javax.swing.JButton; import java.awt.event.ActionListener; import java.io.IOException; import java.awt.event.ActionEvent; public class StuAdd extends JPanel { static JTextField textField; static JTextField textField_1; static JTextField textField_2; static JTextField textField_3; static JTextField textField_4; /** * Create the panel. */ public StuAdd() { setBackground(Color.LIGHT_GRAY); setLayout(null); JLabel lblNewLabel = new JLabel("u5B66 u53F7uFF1A"); lblNewLabel.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel.setBounds(10, 46, 78, 32); add(lblNewLabel); JLabel lblNewLabel_1 = new JLabel("u59D3 u540DuFF1A"); lblNewLabel_1.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_1.setBounds(10, 88, 78, 32); add(lblNewLabel_1); JLabel lblNewLabel_2 = new JLabel("u5E74 u9F84uFF1A"); lblNewLabel_2.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_2.setBounds(10, 130, 78, 32); add(lblNewLabel_2); JLabel lblNewLabel_3 = new JLabel("u4E13 u4E1AuFF1A"); lblNewLabel_3.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_3.setBounds(10, 172, 78, 32); add(lblNewLabel_3); JLabel lblNewLabel_4 = new JLabel("u5BBF u820D u53F7uFF1A"); lblNewLabel_4.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_4.setBounds(10, 214, 90, 32); add(lblNewLabel_4); textField = new JTextField(); textField.setBounds(90, 52, 130, 21); add(textField); textField.setColumns(10); textField_1 = new JTextField(); textField_1.setColumns(10); textField_1.setBounds(90, 94, 130, 21); add(textField_1); textField_2 = new JTextField(); textField_2.setColumns(10); textField_2.setBounds(90, 136, 130, 21); add(textField_2); textField_3 = new JTextField(); textField_3.setColumns(10); textField_3.setBounds(90, 172, 130, 21); add(textField_3); textField_4 = new JTextField(); textField_4.setColumns(10); textField_4.setBounds(90, 220, 130, 21); add(textField_4); JButton btnNewButton = new JButton("u786Eu5B9A"); btnNewButton.setBackground(Color.LIGHT_GRAY); btnNewButton.addActionListener(new ActionListener() { // 確定新增學生資訊監聽: public void actionPerformed(ActionEvent e) { // 範例化學生物件stu並新增資訊 if (textField.getText() == null || textField_1.getText() == null|| textField_2.getText() == null && textField_3.getText() == null|| textField_4.getText() == null) { JOptionPane.showMessageDialog(null, "新增失敗,請檢查輸入!"); } else { // 先把檔案讀取出來在進行新增 if (FileToArrayList.a == true) { try { FileToArrayList.main(null); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } FileToArrayList.a = false; StuInfo stu = new StuInfo(Integer.parseInt(textField.getText()), textField_1.getText(),Integer.parseInt(textField_2.getText()), textField_3.getText(),Integer.parseInt(textField_4.getText())); StuManagerFrm.list.add(stu); // 寫入到檔案 try { ArrayListToFile.main(null); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } //關閉當前面板 StuManagerFrm.frame.getContentPane().remove(StuManagerFrm.stuAddPanel); StuManagerFrm.frame.repaint(); JOptionPane.showMessageDialog(null, "新增成功!"); } } }); btnNewButton.setBounds(10, 275, 97, 23); add(btnNewButton); JButton btnNewButton_1 = new JButton("u53D6u6D88"); btnNewButton_1.setBackground(Color.LIGHT_GRAY); btnNewButton_1.addActionListener(new ActionListener() { // 取消新增學生資訊監聽: public void actionPerformed(ActionEvent e) { StuManagerFrm.frame.getContentPane().remove(StuManagerFrm.stuAddPanel); // 重畫視窗 StuManagerFrm.frame.repaint(); } }); btnNewButton_1.setBounds(123, 275, 97, 23); add(btnNewButton_1); JLabel lblNewLabel_5 = new JLabel("u6DFBu52A0u5B66u751Fu4FE1u606F"); lblNewLabel_5.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_5.setBounds(10, 0, 130, 32); add(lblNewLabel_5); } }
修改學生資訊面板
package stuView; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JOptionPane; import java.awt.Font; import javax.swing.JTextField; import stuManager.ArrayListToFile; import stuManager.FileToArrayList; import javax.swing.JButton; import java.awt.event.ActionListener; import java.io.IOException; import java.awt.event.ActionEvent; import java.awt.Color; public class StuUpdate extends JPanel { private JTextField textField; private JTextField textField_1; private JTextField textField_2; private JTextField textField_3; private JTextField textField_4; /** * Create the panel. */ public StuUpdate() { setBackground(Color.LIGHT_GRAY); setLayout(null); JLabel lblNewLabel = new JLabel("u4F9Du636Eu5B66u53F7u4FEEu6539uFF1A"); lblNewLabel.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel.setBounds(0, 70, 106, 27); add(lblNewLabel); textField = new JTextField(); textField.setBounds(102, 73, 118, 21); add(textField); textField.setColumns(10); JLabel lblNewLabel_1 = new JLabel("u4FEEu6539u540Eu7684u59D3u540DuFF1A"); lblNewLabel_1.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_1.setBounds(0, 115, 106, 27); add(lblNewLabel_1); textField_1 = new JTextField(); textField_1.setColumns(10); textField_1.setBounds(102, 118, 118, 21); add(textField_1); JLabel lblNewLabel_1_1 = new JLabel("u4FEEu6539u540Eu7684u5E74u9F84uFF1A"); lblNewLabel_1_1.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_1_1.setBounds(0, 165, 106, 27); add(lblNewLabel_1_1); JLabel lblNewLabel_1_1_1 = new JLabel("u4FEEu6539u540Eu7684u4E13u4E1AuFF1A"); lblNewLabel_1_1_1.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_1_1_1.setBounds(0, 202, 106, 27); add(lblNewLabel_1_1_1); JLabel lblNewLabel_1_1_2 = new JLabel("u4FEEu6539u540Eu7684u5BDDu5BA4uFF1A"); lblNewLabel_1_1_2.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_1_1_2.setBounds(0, 239, 106, 27); add(lblNewLabel_1_1_2); textField_2 = new JTextField(); textField_2.setColumns(10); textField_2.setBounds(102, 168, 118, 21); add(textField_2); textField_3 = new JTextField(); textField_3.setColumns(10); textField_3.setBounds(102, 202, 118, 21); add(textField_3); textField_4 = new JTextField(); textField_4.setColumns(10); textField_4.setBounds(102, 242, 118, 21); add(textField_4); JButton btnNewButton = new JButton("u786Eu5B9A"); btnNewButton.setBackground(Color.LIGHT_GRAY); btnNewButton.addActionListener(new ActionListener() { // 確定修改學生資訊 public void actionPerformed(ActionEvent e) { if (textField.getText() != null && textField_2.getText() != null && textField_1.getText() != null && textField_3.getText() != null || textField_4.getText() != null) { for (int i = 0; i < StuManagerFrm.list.size(); i++) { if (Integer.parseInt(textField.getText()) == StuManagerFrm.list.get(i).getStuId()) { StuManagerFrm.list.get(i).setStuName(textField_1.getText()); StuManagerFrm.list.get(i).setStuAge(Integer.parseInt(textField_2.getText())); StuManagerFrm.list.get(i).setStuPrefession(textField_3.getText()); StuManagerFrm.list.get(i).setStuHomeNumber(Integer.parseInt(textField_4.getText())); } } JOptionPane.showMessageDialog(null, "修改成功!"); try { ArrayListToFile.main(null); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } else { JOptionPane.showMessageDialog(null, "修改失敗,請檢查輸入!"); } StuManagerFrm.frame.getContentPane().remove(StuManagerFrm.stuUpdatePanel); StuManagerFrm.frame.repaint(); } }); btnNewButton.setBounds(10, 298, 97, 23); add(btnNewButton); JButton btnNewButton_1 = new JButton("u53D6u6D88"); btnNewButton_1.setBackground(Color.LIGHT_GRAY); btnNewButton_1.addActionListener(new ActionListener() { // 取消修改監聽: public void actionPerformed(ActionEvent e) { StuManagerFrm.frame.getContentPane().remove(StuManagerFrm.stuUpdatePanel); StuManagerFrm.frame.repaint(); } }); btnNewButton_1.setBounds(123, 298, 97, 23); add(btnNewButton_1); JLabel lblNewLabel_2 = new JLabel("u5B66u751Fu4FE1u606Fu4FEEu6539"); lblNewLabel_2.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_2.setBounds(0, 10, 106, 27); add(lblNewLabel_2); } }
查詢學生資訊面板
package stuView; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.JLabel; import javax.swing.JTextField; import stuManager.FileToArrayList; import javax.swing.JButton; import java.awt.event.ActionListener; import java.io.IOException; import java.awt.event.ActionEvent; import java.awt.Color; import java.awt.Font; public class StuQuery extends JPanel { private JTextField textField; private JTextField textField_1; private JTextField textField_2; private JTextField textField_3; private JTextField textField_4; /** * Create the panel. */ public StuQuery() { setBackground(Color.LIGHT_GRAY); setLayout(null); JLabel lblNewLabel = new JLabel("u8F93u5165u5B66u53F7u67E5u8BE2:"); lblNewLabel.setBounds(0, 78, 86, 34); add(lblNewLabel); textField = new JTextField(); textField.setBounds(81, 85, 57, 21); add(textField); textField.setColumns(10); JButton btnNewButton = new JButton("u67E5u8BE2"); btnNewButton.setBackground(Color.LIGHT_GRAY); btnNewButton.addActionListener(new ActionListener() { // 學號查詢監聽: public void actionPerformed(ActionEvent e) { StuManagerFrm.textArea.setText("學號" + "t" + "姓名" + "t" + "年齡" + "t" + "專業" + "t" + "宿舍號" + "n"); for (int i = 0; i < StuManagerFrm.list.size(); i++) { if (StuManagerFrm.list.get(i).getStuId() == (Integer.parseInt(textField.getText()))) { StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuId()) + "t");// 學號 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuName() + "t");// 姓名 StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuAge()) + "t");// 年齡 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuPrefession() + "t");// 專業 StuManagerFrm.textArea .append(String.valueOf(StuManagerFrm.list.get(i).getStuHomeNumber()) + "t");// 宿舍號 StuManagerFrm.textArea.append("n"); } } } }); btnNewButton.setBounds(140, 84, 73, 23); add(btnNewButton); JButton btnNewButton_1 = new JButton("u5168u90E8u67E5u8BE2"); btnNewButton_1.setBackground(Color.LIGHT_GRAY); btnNewButton_1.addActionListener(new ActionListener() { // 全部查詢監聽: public void actionPerformed(ActionEvent e) { if (FileToArrayList.a == true) { try { FileToArrayList.main(null); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } FileToArrayList.a = false; StuManagerFrm.textArea.setText("學號" + "t" + "姓名" + "t" + "年齡" + "t" + "專業" + "t" + "宿舍號" + "n"); for (int i = 0; i < StuManagerFrm.list.size(); i++) { StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuId()) + "t");// 學號 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuName() + "t");// 姓名 StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuAge()) + "t");// 年齡 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuPrefession() + "t");// 專業 StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuHomeNumber()) + "t");// 宿舍號 StuManagerFrm.textArea.append("n"); } } }); btnNewButton_1.setBounds(10, 297, 97, 23); add(btnNewButton_1); JLabel lblNewLabel_1 = new JLabel("u8F93u5165u59D3u540Du67E5u8BE2:"); lblNewLabel_1.setBounds(0, 122, 86, 34); add(lblNewLabel_1); textField_1 = new JTextField(); textField_1.setColumns(10); textField_1.setBounds(81, 129, 57, 21); add(textField_1); JButton btnNewButton_2 = new JButton("u67E5u8BE2"); btnNewButton_2.setBackground(Color.LIGHT_GRAY); btnNewButton_2.addActionListener(new ActionListener() { // 姓名查詢監聽: public void actionPerformed(ActionEvent e) { StuManagerFrm.textArea.setText("學號" + "t" + "姓名" + "t" + "年齡" + "t" + "專業" + "t" + "宿舍號" + "n"); for (int i = 0; i < StuManagerFrm.list.size(); i++) { if (StuManagerFrm.list.get(i).getStuName().equals(textField_1.getText())) { StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuId()) + "t");// 學號 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuName() + "t");// 姓名 StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuAge()) + "t");// 年齡 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuPrefession() + "t");// 專業 StuManagerFrm.textArea .append(String.valueOf(StuManagerFrm.list.get(i).getStuHomeNumber()) + "t");// 宿舍號 StuManagerFrm.textArea.append("n"); } } } }); btnNewButton_2.setBounds(140, 128, 73, 23); add(btnNewButton_2); JLabel lblNewLabel_1_1 = new JLabel("u8F93u5165u5E74u9F84u67E5u8BE2:"); lblNewLabel_1_1.setBounds(0, 166, 86, 34); add(lblNewLabel_1_1); textField_2 = new JTextField(); textField_2.setColumns(10); textField_2.setBounds(81, 173, 57, 21); add(textField_2); JButton btnNewButton_2_1 = new JButton("u67E5u8BE2"); btnNewButton_2_1.setBackground(Color.LIGHT_GRAY); btnNewButton_2_1.addActionListener(new ActionListener() { // 年齡查詢監聽: public void actionPerformed(ActionEvent e) { StuManagerFrm.textArea.setText("學號" + "t" + "姓名" + "t" + "年齡" + "t" + "專業" + "t" + "宿舍號" + "n"); for (int i = 0; i < StuManagerFrm.list.size(); i++) { if (StuManagerFrm.list.get(i).getStuAge() == (Integer.parseInt(textField_2.getText()))) { StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuId()) + "t");// 學號 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuName() + "t");// 姓名 StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuAge()) + "t");// 年齡 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuPrefession() + "t");// 專業 StuManagerFrm.textArea .append(String.valueOf(StuManagerFrm.list.get(i).getStuHomeNumber()) + "t");// 宿舍號 StuManagerFrm.textArea.append("n"); } } } }); btnNewButton_2_1.setBounds(140, 172, 73, 23); add(btnNewButton_2_1); JLabel lblNewLabel_1_1_1 = new JLabel("u8F93u5165u4E13u4E1Au67E5u8BE2:"); lblNewLabel_1_1_1.setBounds(0, 205, 86, 34); add(lblNewLabel_1_1_1); textField_3 = new JTextField(); textField_3.setColumns(10); textField_3.setBounds(81, 212, 57, 21); add(textField_3); JButton btnNewButton_2_1_1 = new JButton("u67E5u8BE2"); btnNewButton_2_1_1.setBackground(Color.LIGHT_GRAY); btnNewButton_2_1_1.addActionListener(new ActionListener() { // 專業查詢監聽 public void actionPerformed(ActionEvent e) { StuManagerFrm.textArea.setText("學號" + "t" + "姓名" + "t" + "年齡" + "t" + "專業" + "t" + "宿舍號" + "n"); for (int i = 0; i < StuManagerFrm.list.size(); i++) { if (StuManagerFrm.list.get(i).getStuPrefession().equals(textField_3.getText())) { StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuId()) + "t");// 學號 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuName() + "t");// 姓名 StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuAge()) + "t");// 年齡 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuPrefession() + "t");// 專業 StuManagerFrm.textArea .append(String.valueOf(StuManagerFrm.list.get(i).getStuHomeNumber()) + "t");// 宿舍號 StuManagerFrm.textArea.append("n"); } } } }); btnNewButton_2_1_1.setBounds(140, 211, 73, 23); add(btnNewButton_2_1_1); JLabel lblNewLabel_1_1_1_1 = new JLabel("u8F93u5165u5BDDu5BA4u67E5u8BE2:"); lblNewLabel_1_1_1_1.setBounds(0, 242, 86, 34); add(lblNewLabel_1_1_1_1); textField_4 = new JTextField(); textField_4.setColumns(10); textField_4.setBounds(81, 249, 57, 21); add(textField_4); JButton btnNewButton_2_1_1_1 = new JButton("u67E5u8BE2"); btnNewButton_2_1_1_1.setBackground(Color.LIGHT_GRAY); btnNewButton_2_1_1_1.addActionListener(new ActionListener() { // 宿舍號查詢監聽: public void actionPerformed(ActionEvent e) { StuManagerFrm.textArea.setText("學號" + "t" + "姓名" + "t" + "年齡" + "t" + "專業" + "t" + "宿舍號" + "n"); for (int i = 0; i < StuManagerFrm.list.size(); i++) { if (StuManagerFrm.list.get(i).getStuHomeNumber() == (Integer.parseInt(textField_4.getText()))) { StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuId()) + "t");// 學號 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuName() + "t");// 姓名 StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuAge()) + "t");// 年齡 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuPrefession() + "t");// 專業 StuManagerFrm.textArea .append(String.valueOf(StuManagerFrm.list.get(i).getStuHomeNumber()) + "t");// 宿舍號 StuManagerFrm.textArea.append("n"); } } } }); btnNewButton_2_1_1_1.setBounds(140, 248, 73, 23); add(btnNewButton_2_1_1_1); JButton btnNewButton_1_1 = new JButton("u53D6u6D88u67E5u8BE2"); btnNewButton_1_1.setBackground(Color.LIGHT_GRAY); btnNewButton_1_1.addActionListener(new ActionListener() { // 取消查詢: public void actionPerformed(ActionEvent e) { StuManagerFrm.frame.getContentPane().remove(StuManagerFrm.stuQueryPanel); StuManagerFrm.frame.repaint(); } }); btnNewButton_1_1.setBounds(116, 297, 97, 23); add(btnNewButton_1_1); JLabel lblNewLabel_2 = new JLabel("u5B66u751Fu4FE1u606Fu67E5u8BE2"); lblNewLabel_2.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_2.setBounds(10, 10, 114, 34); add(lblNewLabel_2); } }
刪除學生資訊面板
package stuView; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JTextField; import stuManager.ArrayListToFile; import stuManager.ClearFile; import javax.swing.JButton; import java.awt.Font; import java.awt.event.ActionListener; import java.io.IOException; import java.awt.event.ActionEvent; import java.awt.Color; public class StuDelete extends JPanel { private JTextField textField; private JTextField textField_1; /** * Create the panel. */ public StuDelete() { setBackground(Color.LIGHT_GRAY); setLayout(null); JLabel lblNewLabel = new JLabel("u901Au8FC7u5B66u53F7u5220u9664uFF1A"); lblNewLabel.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel.setBounds(0, 81, 119, 25); add(lblNewLabel); textField = new JTextField(); textField.setBounds(102, 83, 55, 21); add(textField); textField.setColumns(10); JButton btnNewButton = new JButton("u5220u9664"); btnNewButton.setBackground(Color.LIGHT_GRAY); btnNewButton.addActionListener(new ActionListener() { // 通過學號刪除: public void actionPerformed(ActionEvent e) { boolean a = false;// 判斷是否進行了刪除操作 for (int i = 0; i < StuManagerFrm.list.size(); i++) { if (Integer.parseInt(textField.getText()) == StuManagerFrm.list.get(i).getStuId()) { StuManagerFrm.list.remove(i); a = true; } } if (a == true) { JOptionPane.showMessageDialog(null, "刪除成功!"); try { ArrayListToFile.main(null); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } else JOptionPane.showMessageDialog(null, "刪除失敗,請確認學號是否正確!"); } }); btnNewButton.setBounds(157, 82, 63, 23); add(btnNewButton); JLabel lblNewLabel_1 = new JLabel("u901Au8FC7u59D3u540Du5220u9664uFF1A"); lblNewLabel_1.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_1.setBounds(0, 125, 119, 25); add(lblNewLabel_1); textField_1 = new JTextField(); textField_1.setColumns(10); textField_1.setBounds(102, 127, 55, 21); add(textField_1); JButton btnNewButton_1 = new JButton("u5220u9664"); btnNewButton_1.setBackground(Color.LIGHT_GRAY); btnNewButton_1.addActionListener(new ActionListener() { // 通過姓名刪除監聽 public void actionPerformed(ActionEvent e) { boolean a = false; for (int i = 0; i < StuManagerFrm.list.size(); i++) { if (textField_1.getText().equals(StuManagerFrm.list.get(i).getStuName())) { StuManagerFrm.list.remove(i); a = true; } } if (a == true) { JOptionPane.showMessageDialog(null, "刪除成功!"); try { ArrayListToFile.main(null); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } else JOptionPane.showMessageDialog(null, "刪除失敗,請確認姓名是否正確!"); } }); btnNewButton_1.setBounds(157, 126, 63, 23); add(btnNewButton_1); JButton btnNewButton_2 = new JButton("u5168u90E8u5220u9664"); btnNewButton_2.setBackground(Color.LIGHT_GRAY); btnNewButton_2.addActionListener(new ActionListener() { // 全部刪除監聽 public void actionPerformed(ActionEvent e) { StuManagerFrm.list.clear(); ClearFile.clearInfoForFile(null); JOptionPane.showMessageDialog(null, "刪除成功!"); } }); btnNewButton_2.setBounds(0, 253, 97, 23); add(btnNewButton_2); JButton btnNewButton_3 = new JButton("u53D6u6D88"); btnNewButton_3.setBackground(Color.LIGHT_GRAY); btnNewButton_3.addActionListener(new ActionListener() { // 取消刪除監聽 public void actionPerformed(ActionEvent e) { StuManagerFrm.frame.getContentPane().remove(StuManagerFrm.stuDeletePanel); StuManagerFrm.frame.repaint(); } }); btnNewButton_3.setBounds(123, 253, 97, 23); add(btnNewButton_3); JButton btnNewButton_4 = new JButton("u5237u65B0"); btnNewButton_4.setBackground(Color.LIGHT_GRAY); btnNewButton_4.addActionListener(new ActionListener() { // 刪除頁面重新整理資料監聽 public void actionPerformed(ActionEvent e) { StuManagerFrm.textArea.setText("學號" + "t" + "姓名" + "t" + "年齡" + "t" + "專業" + "t" + "宿舍號" + "n"); for (int i = 0; i < StuManagerFrm.list.size(); i++) { StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuId()) + "t");// 學號 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuName() + "t");// 姓名 StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuAge()) + "t");// 年齡 StuManagerFrm.textArea.append(StuManagerFrm.list.get(i).getStuPrefession() + "t");// 專業 StuManagerFrm.textArea.append(String.valueOf(StuManagerFrm.list.get(i).getStuHomeNumber()) + "t");// 宿舍號 StuManagerFrm.textArea.append("n"); } } }); btnNewButton_4.setBounds(123, 184, 97, 23); add(btnNewButton_4); JLabel lblNewLabel_2 = new JLabel("u5B66u751Fu4FE1u606Fu5220u9664"); lblNewLabel_2.setFont(new Font("SimSun", Font.PLAIN, 15)); lblNewLabel_2.setBounds(0, 22, 119, 25); add(lblNewLabel_2); } }
總結
1.增刪改查的基本操作都能正常完成。
2.對於視窗介面部分的開發運用eclipse外掛WindowBuilder對專案效果上有了很大的幫助,使得可以自由設計自己想要的介面。
3.設計框架不夠清晰,部分學生資訊操作在監聽內完成。
4.沒有采用資料庫儲存資料而是通過io流在本地完成對檔案的儲存。
改進點:
1.採用MVC設計方式完成本專案。
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支援it145.com。
相關文章
<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
综合看Anker超能充系列的性价比很高,并且与不仅和iPhone12/苹果<em>Mac</em>Book很配,而且适合多设备充电需求的日常使用或差旅场景,不管是安卓还是Switch同样也能用得上它,希望这次分享能给准备购入充电器的小伙伴们有所
2021-06-01 09:31:42
除了L4WUDU与吴亦凡已经多次共事,成为了明面上的厂牌成员,吴亦凡还曾带领20XXCLUB全队参加2020年的一场音乐节,这也是20XXCLUB首次全员合照,王嗣尧Turbo、陈彦希Regi、<em>Mac</em> Ova Seas、林渝植等人全部出场。然而让
2021-06-01 09:31:34
目前应用IPFS的机构:1 谷歌<em>浏览器</em>支持IPFS分布式协议 2 万维网 (历史档案博物馆)数据库 3 火狐<em>浏览器</em>支持 IPFS分布式协议 4 EOS 等数字货币数据存储 5 美国国会图书馆,历史资料永久保存在 IPFS 6 加
2021-06-01 09:31:24
开拓者的车机是兼容苹果和<em>安卓</em>,虽然我不怎么用,但确实兼顾了我家人的很多需求:副驾的门板还配有解锁开关,有的时候老婆开车,下车的时候偶尔会忘记解锁,我在副驾驶可以自己开门:第二排设计很好,不仅配置了一个很大的
2021-06-01 09:30:48
不仅是<em>安卓</em>手机,苹果手机的降价力度也是前所未有了,iPhone12也“跳水价”了,发布价是6799元,如今已经跌至5308元,降价幅度超过1400元,最新定价确认了。iPhone12是苹果首款5G手机,同时也是全球首款5nm芯片的智能机,它
2021-06-01 09:30:45