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

正文內(nèi)容

java課程設(shè)計(jì)---基于java的在線評(píng)測系統(tǒng)的設(shè)計(jì)與開發(fā)-在線瀏覽

2025-03-07 12:49本頁面
  

【正文】 (1)當(dāng)考試時(shí),意外關(guān)閉窗口時(shí),考試答案不會(huì)保存。 (new WindowAdapter() { Override public void windowClosing(WindowEvent e) { int val=(null, 確定離開?)。 ()。(2)發(fā)現(xiàn)登錄見面的取消按鈕無作用。 9設(shè)計(jì)心得體會(huì) 面向?qū)ο?java是面向?qū)ο蟪绦蛟O(shè)計(jì)語言,這次課程實(shí)踐.,我更加深刻地理解了面向?qū)ο蟮母拍?我覺得這是我這次實(shí)踐的第一個(gè)收貨.。更要多實(shí)踐,它對(duì)知識(shí)的收獲將是更深刻的。3怎樣讓在一個(gè)類中創(chuàng)建的對(duì)象在其他類中可用并且該對(duì)象只在內(nèi)存中存在一個(gè)?答:可通過依賴注入方法實(shí)現(xiàn),例如可用get(),set()方法來實(shí)現(xiàn)引用類型參數(shù)傳遞。import 。import 。import 。import 。 //主類public class Main { public static void main(String[] args) { ClientContext clientContext=new ClientContext()。 //登錄界面 LoginFrame loginFrame=new LoginFrame()。 //考試界面 ExamFrame examFrame=new ExamFrame()。 EntityContext entityContext=new EntityContext()。 (ruleFrame)。 (clientContext)。 (entityContext)。 (loginFrame)。 (examFrame)。 ()。import 。import 。import 。import 。import 。import 。public class ClientContext { //歡迎界面 WeleWindow weleWindow。 //菜單界面 MenuFrame menuFrame。 ExamService examService。 JTextField idTextField。 User loginUser。 int score。 = loginFrame。 = examFrame。 Timer timer=new Timer()。 (true)。 } public void login(){ User u。 String userPwd=()。 loginUser=u。 (())。 } catch (IdOrPwdException e1) { (loginFrame, ())。 } catch (Exception e3){ (loginFrame, 系統(tǒng)錯(cuò)誤!請(qǐng)聯(lián)系系統(tǒng)管理員!)。 return。 curQuestion=().get(0)。 startTime()。 (true)。 long startTime=()。 final Timer timer=new Timer()。 long h=time/1000/60/60。 long s=time/1000%60。 (timeStr)。 (new TimerTask() { Override public void run() { ()。 send()。//到指定Date時(shí)間執(zhí)行run方法 } public void next(){ saveUserAnswer()。 curQuestion=nextQuestion。 } public void pre(){ saveUserAnswer()。 curQuestion=preQuestion。//更新面板內(nèi)容 } public void send(){ saveUserAnswer()。 (examFrame, 分?jǐn)?shù): +score)。 (true)。 } public void saveUserAnswer(){ int curIndex=()。 (curIndex,userAnswer)。 return。 } public void examFrameExit(){ (false)。 } public void setWeleWindow(WeleWindow weleWindow) { = weleWindow。 } public void setLoginFrame(LoginFrame loginFrame) { = loginFrame。 } public void setMenuFrame(MenuFrame menuFrame) { = menuFrame。 } public void setExamFrame(ExamFrame examFrame) { = examFrame。 } public void setExamService(ExamService examService) { = examService。 } public void cancel() { (null)。 } public JTextField getIdTextField() { return idTextField。 } public JPasswordField getPwdField() { return pwdField。 }}WeleWindow類代碼:package 。import 。import 。import .*。public class WeleWindow extends JWindow{ int width=430。 public WeleWindow(){ // init()。 centerWindow()。 } public JPanel createContentPane(){ JPanel p=new JPanel(new BorderLayout())。 ImageIcon icon=new ImageIcon(url)。 (,new JLabel(icon))。 } public void centerWindow(){ Toolkit tk=()。 (()/2, ()/2)。import .*。import .*。import 。 int width=300。 ClientContext clientContext。 JPasswordField pwdField。 } //方法 //給窗體初始化 public void init(){ setTitle(title)。 centerFrame()。 } //創(chuàng)建主面板 public JPanel createContentPane(){ JPanel p = new JPanel(new BorderLayout())。//設(shè)置內(nèi)邊距 //給主面板添加組件 (,createBottomPane())。 (,createCenterPane())。 } //創(chuàng)建主面板的中間面板 public JPanel createCenterPane(){ JPanel p = new JPanel(new BorderLayout())。 return p。 (createIdPane())。 return p。 (,new JLabel(編號(hào):))。 (,idTextField)。 } //創(chuàng)建密碼面板 public JPanel createPwdPane(){ JPanel p = new JPanel(new BorderLayout())。 pwdField=new JPasswordField()。 return p。 JButton loginBtn=new JButton(登錄)。 } })。 (new ActionListener() { Override public void actionPerformed(ActionEvent e) { (idTextField)。 ()。 (loginBtn)。 return p。 Dimension d=()。 } public int getUserId(){ return (())。 } public ClientContext getClientContext() { return clientContext。 } }MenuFrame類代碼:package 。import 。import 。import 。import 。import 。public class MenuFrame extends JFrame{ //屬性 String title=選擇菜單界面。 int height=350。 ClientContext clientContext。 //構(gòu)造方法 public MenuFrame(){ //調(diào)用初始化方法init(),完成窗體的初始化(給窗體設(shè)置相關(guān)屬性) init()。 //給窗體設(shè)置初始大小(寬、高) (width, height)。 setDefaultCloseOperation()。 if(val==){ (0)。 //給窗體設(shè)置主面板 (createContentPane())。 (,createImageLabel())。 (, new JLabel(達(dá)內(nèi)科技如有雷同,純屬巧合,))。 } //創(chuàng)建主面板的中間面板(上 下) public JPanel createCenterPane(){ JPanel p=new JPanel(new BorderLayout())。 (,userInfoLab)。 return p。 URL url=()。 (icon)。 } //創(chuàng)建中間面板“下” 部分的四個(gè)按鈕(開始、分?jǐn)?shù)、考試規(guī)則、離開) 面板 public JPanel createBtnsPane(){ JPanel p=new JPanel(new FlowLayout())。 (createScoreBtn())。 (createExitBtn())。 } //創(chuàng)建帶圖片和文本的開始按鈕 public JButton createStartBtn(){ URL url=()。 JButton startBtn=new JButton(開始, icon)。 } })。 ()。 } //創(chuàng)建帶圖片和文本的分?jǐn)?shù)按鈕 public JButton createScoreBtn(){ URL url=()。 JButton scoreBtn=new JButton(分?jǐn)?shù), icon)。 } })。 ()。 } //創(chuàng)建帶圖片和文本的考試規(guī)則按鈕 public JButton createRuleBtn(){ URL url=()。 JButton ruleBtn=new JButton(考試規(guī)則, icon)。 } })。 ()。 } //創(chuàng)建帶圖片和文本的離開按鈕 public JButton createExitBtn(){ URL url=()。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1