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

正文內(nèi)容

面向對象程序設計實驗(編輯修改稿)

2024-08-03 15:57 本頁面
 

【文章內(nèi)容簡介】 造一個新窗體對 }}/* 一個簡單的銷售系統(tǒng)設計示例 版本:Ver 作者:強余彬 時間: *//* 銷售系統(tǒng)主登陸窗口圖形界面類 */package SalesSystem。import .*。import .*。import .*。import .*。import .*。import .*。 public class GUI extends Frame implements ActionListener,ItemListener{ TextField txId。 //一定一個寬度為10個字符的文本框,用于答案輸入 TextField txPassword。 Label lbTitle。 Label lbId。 Label lbPassword。 Button btOk。 Button btCancel。 Button btReset。 Label type。 Choice typeChoice。 Font myFont。 String chtype。 public User u。 GUI() //構造函數(shù),用來初始化 { super(主登陸界面)。 //調(diào)用父類構造函數(shù) btOk=new Button(確定)。 btCancel=new Button(退出)。 btReset=new Button(重置)。 chtype=銷售人員。 typeChoice=new Choice()。 type=new Label(身份:)。 lbTitle=new Label(商品銷售系統(tǒng) )。 (myFont)。 lbId=new Label(用戶賬號 )。 txId=new TextField(10)。 lbPassword=new Label(用戶密碼 )。 txPassword=new TextField(10)。 (39。*39。)。 myFont=new Font(黑體,20)。 //定義字體為黑體、加粗、字號18 GridBagLayout gbl=new GridBagLayout()。 GridBagConstraints gbc=new GridBagConstraints()。 setLayout(gbl )。 // 設置標題控件的位置 =。 //讓標題頂部居中 =。 //讓標題成為所在行最后(也是唯一)一個組件 add(lbTitle,gbc)。 //設置姓名控件的位置 =。 //讓ID標簽位于左側 =1。 //占一個單元格 add(lbId,gbc)。 =。 //讓ID輸入框成為所在行最后一個組件 add(txId,gbc)。 //設置密碼控件的位置 =1。 add(lbPassword,gbc)。 =。 add(txPassword,gbc)。 //設置身份控件的位置 =1。 add(type,gbc)。 add(typeChoice,gbc)。 (銷售人員)。 (系統(tǒng)管理員)。 =。 //讓ID輸入框成為所在行最后一個組件 add(typeChoice,gbc)。 =。 =1。 add(btOk,gbc)。 =1。 add(btCancel,gbc)。 =。 //讓ID輸入框成為所在行最后一個組件 add(btReset,gbc)。 (this)。 //為輸入文本框注冊監(jiān)聽器對象 (this)。 //為按鈕注冊監(jiān)聽器對象 (this)。 (this)。 setBackground()。 //設置背景色為黃色 setSize(300,260)。 setBounds(450,220,300,260)。 setVisible(true)。 validate()。 }public void itemStateChanged(ItemEvent e){ if(() instanceof Choice) { chtype=((Choice)()).getSelectedItem()。 }} public void actionPerformed(ActionEvent e) //實現(xiàn)ActionListener接口的actionPerformed方法 { if(()==btOk) {//判斷事件源,如果是輸入文本框 boolean a,b,c。 a=((),(),chtype)。 b=((),(),chtype)。 c=((),(),chtype)。 if(a||b||c) { if((系統(tǒng)管理員)) { new ManagerGUI(系統(tǒng)管理員:強余彬)。 (false)。 } else { if(b)u=。 else u=。 new SalesmanGUI(銷售人員:+(),u)。 (false)。 } } else if(((),())||((),())||((),())) (null,密碼輸入錯誤!)。 else (null,此賬號不存在!,錯誤,)。 } else if(()==btReset) { ()。 ()。 } else (0)。 //系統(tǒng)正常退出,如果參數(shù)是1,則為異常退出 }}/* 一個簡單的銷售系統(tǒng)設計示例 版本:Ver 作者:強余彬 時間: *//* 系統(tǒng)管理員圖形界面類 */package 。import .*。import .*。import .*。import .*。import 。import .*。import .*。public class ManagerGUI extends JFrame implements ActionListener /**這里定義了一個圖形用戶界面主要按鈕大類 */{//為了便于其它包繼承訪問 把標簽都設為了公有的 public Font myFont=new Font(宋體,20)。 public JButton btnQuit=new JButton(退出)。 public JRadioButton radResetData。 public JRadioButton radAddData。 public JRadioButton radDeleatData。 public JRadioButton radPrintData。 public JRadioButton radOrder。 public JRadioButton radCancelOrder。 public JRadioButton radConsultProduct。 public JRadioButton radAddProduct。 public JRadioButton radDeleteProduct。 public JRadioButton radResetProduct。 public JRadioButton radResetPassword。 public JLabel lbltittle=new JLabel(系統(tǒng)管理員,)。 public ButtonGroup radioGroup=new ButtonGroup()。 FrameListener fListener=new FrameListener()。 //響應用戶的退出操作 public ManagerGUI(String s) { super(s)。 radResetData=new JRadioButton(,false)。 radAddData=new JRadioButton(,false)。 radDeleatData=new JRadioButton(,false)。 radPrintData=new JRadioButton(,false)。 radOrder=new JRadioButton(,false)。 radCancelOrder=new JRadioButton(,false)。 radConsultProduct=new JRadioButton(,false)。 radAddProduct=new JRadioButton(,false)。 radDeleteProduct=new JRadioButton(,false)。 radResetProduct=new JRadioButton(,false)。 radResetPassword=new JRadioButton(,false)。 Container c=getContentPane()。 (null)。 (myFont)。 (lbltittle)。 (btnQuit)。 (radResetData)。 (radAddData)。 (radDeleatData)。 (radPrintData)。 (radOrder)。 (radCancelOrder)。 (radConsultProduct)。 (radAddProduct)。 (radDeleteProduct)。 (radResetProduct)。 (radResetPassword)。 (radResetData)。 (radAddData)。 (radDeleatData)。 (radPrintData)。 (radOrder)。 (radCancelOrder)。 (radConsultProduct)。 (radAddProduct)。 (radDeleteProduct)。 (radResetProduct)。 (radResetPassword)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (fListener)。//關閉系統(tǒng)監(jiān)聽器 //給各個界面元素定位 (50,50,200,40)。 (50,100,200,40)。 (50,150,200,40)。 (50,200,200,40)。 (50,250,200,40)。 (300,50,200,40)。 (300,100,200,40)。 (300,150,200,40)。 (300,200,200,40)。 (300,250,200,40)。 (300,300,200,40)。 (130,10,200,40)。 (200,350,100,40)。 (this)。 setSize(500,500)。 setVisible(true)。 setResizable(false)。 setBounds(300,160,500,500)。 } public void actionPerformed(ActionEvent e) { if(().equals()) { new ReviseClientGUI(修改客戶資料)。 } else if(().equals()) { new AddClientGUI()。 //(添加客戶ahahahah )。 } else if(().equals()) { new DeleteClient()。 } else if(().equals()) { new InquiryClientGUI()。 } else if(().equals()) { new
點擊復制文檔內(nèi)容
法律信息相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1