freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

java課程設計——學生信息管理系統(tǒng)(文件)

2025-04-25 06:04 上一頁面

下一頁面
 

【正文】 “刪除畢業(yè)生信息”“增加成績信息”和“刪除成績信息”四個菜單項,當點擊“增加新生信息”時,通過注冊事件,創(chuàng)建StudentAddUI類的對象,即打開添加學生基本信息的窗口,當點擊“刪除畢業(yè)生信息”時,通過注冊事件,創(chuàng)建StudentDeleteUI類的對象,即打開刪除學生基本信息的窗口,當點擊“增加成績信息”時,通過注冊事件,創(chuàng)建ScoreAddUI類的對象,即打開添加成績信息的窗口,當點擊“刪除成績信息”時,通過注冊事件,創(chuàng)建ScoreDeleteUI類的對象,即打開刪除成績信息的窗口。import .*。 (new BorderLayout())。 (100, 100, 400, 300)。 (new ExitActionListener())。 JMenuItem queryMenuItem=new JMenuItem(學生基本信息)。//注冊事件 (queryMenuItem)。 JMenuItem addMenuItem=new JMenuItem(增加新生信息)。 (new AddActionListener())。//注冊事件 (addMenuItem)。 (changeMenu)。 } } class QueryActionListener implements ActionListener{ public void actionPerformed(ActionEvent e){ new InformationQueryUI()。 } } class DeleteScoreActionListener implements ActionListener{ public void actionPerformed(ActionEvent e) { new ScoreDeleteUI()。在文本框中輸入要檢索的屬性內(nèi)容,單擊“檢索”按鈕時,通過注冊事件,在內(nèi)部類的方法中把剛才獲取的屬性參數(shù)和內(nèi)容參數(shù)傳給StudentDao類的queryStudent()方法,從而獲取檢索內(nèi)容,再把檢索得到的內(nèi)容通過Vector對象放入ArrayList類的對象lis中,從而使檢索結(jié)果顯示在表格中。import .*。import 。 JPanel topPanel。 String fieldSelected。 JPanel bottomPanel。 (請選擇...)。 (性別)。 retrievalButton = new JButton(檢索)。 (selectionLabel)。 (, topPanel)。 (, bookScrollPane)。 (600, 450)。 break。 break。 break。 VectorString head = new Vector()。 (性別)。 i ()。 (())。 (row)。 } } public static void main(String[] args) { new InformationQueryUI()。ScoreQueryUI類源代碼:package ui。import .*。import 。 JTextField keywordText。 JTable table。 selectionLabel = new JLabel(學生姓名)。 (new FlowLayout())。 (retrievalButton)。 bookScrollPane = new JScrollPane(table)。 (學生信息檢索查詢系統(tǒng))。 ScoreDao oneScore=new ScoreDao()。 (姓名)。 VectorVector content = new Vector()。 Score oneScore1 = (Score) (i)。 (())。 (model)。根據(jù)五個標簽的提示,分別在五個文本框中輸入信息。import .*。public class StudentAddUI extends JFrame{ JLabel l1, l2, l3, l4, l5。 l2 = new JLabel(姓名)。 t1 = new JTextField(12)。 t5 = new JTextField(6)。 (null)。 (t1)。 (t2)。 (t3)。 (t4)。 (t5)。 (bt2)。 (p1)。 (new WindowAdapter() {// 匿名類開始 public void windowClosing(WindowEvent e) // 把退出窗口的語句寫在本方法中 { dispose()。 String sname = ()。 boolean issuccess = (num, sname, sex,age,dept)。 ()。 } } } class CloseListener implements ActionListener{ public void actionPerformed(ActionEvent e) { dispose()。當單擊“刪除”按鈕時,通過注冊事件,在內(nèi)部類的actionPerformed()方法中,獲取這個文本框中的信息,作為實參,通過StudentDao類的deleteStudent()方法,就該省成績信息刪除。import .*。 JTextField t1。 bt1 = new JButton(刪除)。 (100, 100, 250, 50)。 (140, 300, 80, 30)。 (new DeleteListener())。 (刪除畢業(yè)生界面)。 } // 窗口關(guān)閉 })。 if (issuccess) { (null, delete success, 提示信息, )。 } } public static void main(String[] args) { new StudentDeleteUI ()。若添加成功,提示成功,否則提示失敗。import .*。 JButton bt1, bt2。 l4 = new JLabel(成績)。 t3 = new JTextField(20)。 bt2 = new JButton(退出)。 (l1)。 (l2)。 (l3)。 (l4)。 (l5)。 (bt1)。 (new CloseListener())。 (400, 400)。 } class AddListener implements ActionList。 (new WindowAdapter() {// 匿名類開始 public void windowClosing(WindowEvent e) // 把退出窗口的語句寫在本方法中 { dispose()。 (p1)。 (bt2)。 (t5)。 (t4)。 (t3)。 (t2)。 (t1)。 (null)。 t5 = new JTextField(20)。 t1 = new JTextField(20)。 l2 = new JLabel(姓名)。public class ScoreAddUI extends JFrame{ JLabel l1, l2, l3, l4, l5。import .*。根據(jù)五個標簽的提示,分別在五個文本框中輸入信息。 } else { (null, delete failure, 提示信息, )。 String sname = ()。 (true)。 (200, 200, (), ())。 (280, 300, 80, 30)。 (150, 200, 100, 30)。 JPanel p1 = new JPanel()。 public StudentDeleteUI () { l1 = new JLabel(請輸入要刪除基本信息的學生姓名:)。import 。StudentDeleteUI類源代碼:package ui。 }}執(zhí)行截圖如下:(9)StudentDeleteUI類:此類為刪除學生基本信息界面類,在此界面中有一個標簽,一個文本框,還有兩個按鈕“刪除”“退出”。 ()。 ()。 int age = (())。 } class AddListener implements ActionListener{ public void actionPerformed(ActionEvent arg0) { StudentDao oneStudentDao = new StudentDao()。 (400, 400)。 (new CloseListener())。 (bt1)。 (l5)。 (l4)。 (l3)。 (l2)。 (l1)。 bt2 = new JButton(退出)。 t3 = new JTextField(24)。 l4 = new JLabel(年齡)。 JButton bt1, bt2。import .*。若添加成功,提示成功,否則提示失敗。 } } public static void main(String[] args) { new ScoreQueryUI()。 (row)。 (())。 i ()。 (成績)。 VectorString head = new Vector()。 (true)。 bottomPanel = new JPanel()。 (new RetrievalActionListener())。 (selectionLabel)。 retrievalButton = new JButton(查詢)。 JPanel bottomPanel。 String fieldSelected。 JPanel topPanel。import 。import .*。在文本框中輸入要查詢成績的學生姓名,單擊“查詢”按鈕時,通過注冊事件,在內(nèi)部類的方法里,獲取從文本框中獲取的學生姓名信息,并把此信息作為實參傳給ScoreDao類的queryScore()方法,得到查詢結(jié)構(gòu)。 (model)。 (())。 Student oneStudent = (Student) (i)。 VectorVector content = new Vector()。 (姓名)。 StudentDao oneStudentDao = new StudentDao()。 break。 break。 } class SelectedListener implements ItemListener{ public void itemStateChanged(ItemEvent event) { if (() == ) { selectedNum = ()。 (, bottomPanel)。//給檢索按鈕注冊事件 table = new JTable()。 (keywordText)。 (new FlowLayout())。 (new SelectedListener())。 (姓名)。 selectionLabel = new JLabel(檢索方式)。 JTable table。 JTextField keywordText。public class InformationQueryUI extends JFrame{ JLabel selectionLabel。import .*。import .*。 }}執(zhí)行截圖如下:(6)InformationQueryUI類:此類為學生基本信息查詢界面類,在此界面上有一個標簽,一個下拉列表框,一個文本框和一個按鈕。 } } class DeleteActionListener implements ActionListener{ public void actionPerformed(ActionEvent e){ new StudentDeleteUI()。 if (result == 0) (0)。 (addScoreMenuItem)。//注冊事件 (new AddScoreActionListener())。 JMenuItem addScoreMenuItem=new JMenuItem(增加成績信息)。 (queryMenu)。 (new QueryActionListener())。 (fileMenu)。 } public void buildMainMenu(JMenuBar menuBar
點擊復制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1