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

正文內容

基于java的在線考試系統(tǒng)設計與實現(xiàn)_畢業(yè)論文-資料下載頁

2025-08-20 17:47本頁面

【導讀】的逐步完善,傳統(tǒng)的考試方式已經(jīng)不能適應現(xiàn)代化考試的需要。開發(fā)基于Java的在線考試系統(tǒng),通過。本文設計了基于C/S模式,采用了易于維護的文件來存儲試題和用戶,服務器采用Java組件。構成的考試系統(tǒng),它運用方便、操作簡單,效率很高。也就是說實現(xiàn)了真正的無紙化考試,滿足考生隨。時隨地考試并迅速獲得成績,大大減輕了教師出題、組卷和改卷等繁重的工作量。

  

【正文】 * * north 存放用戶名密碼的輸入框 panel */ (createIdPwdPane(),)。 /** * center 存放用于顯示錯誤信息的 label */ message = new JLabel(,)。 (message,)。 return panel。 } //此 panel 用于存放用戶名和密碼 private JPanel createIdPwdPane(){ /** * 兩行一列,每列存放一組內容( id 輸入框),(密碼 輸入框) */ JPanel panel = new JPanel(new GridLayout(2,1,0,6))。//水平間距 0,垂直間距 6 //第一行 (createIdPane())。 //第二行 (createPwdPane())。 return panel。 } private JPanel createIdPane(){ JPanel panel = new JPanel(new BorderLayout(6,0))。//水平間距 6,垂直間距 0 (new JLabel(編號: ),)。 防災科技學院畢業(yè)設計 22 idField = new JTextField()。 (idField,)。 return panel。 } private JPanel createPwdPane(){ JPanel panel = new JPanel(new BorderLayout(6,0))。//水平間距 6,垂直間距 0 (new JLabel(密碼: ), )。 passwordField = new JPasswordField()。 //允許密碼框輸入法,應對 linux 的輸入問題 ,linux 也可以用 (true)。 (passwordField, )。 return panel。 } /** * 創(chuàng)建存放兩個按鈕的 panel */ private JPanel createBtnPane(){ JPanel panel = new JPanel()。 JButton login = new JButton(登錄 )。 //給登錄按鈕添加一個單擊事件 (new ActionListener(){ public void actionPerformed(ActionEvent e){ //當用戶點擊 Login 按鈕后,調用控制器的 login()方法作登錄 ()。 } })。 防災科技學院畢業(yè)設計 23 JButton cancel = new JButton(取消 )。 (new ActionListener(){ @Override public void actionPerformed(ActionEvent e) { ()。 } })。 (login)。 (cancel)。 return panel。 } /** * 通過該方法可以獲取到窗口中用戶輸入的 Id值 * @return */ public int getId(){ //1 從 Id的文本輸入框中獲取用戶輸入的內容 String info = ()。 //2 將這個字符串轉換成 int 值,并返回 return (info)。 } /** * 通過此方法可以獲取到窗口中用戶輸入的密碼 * @return */ public String getPassword(){ /** * 注意:要獲取密碼框中的內容不要調用 getText()方法,官方不推薦使防災科技學院畢業(yè)設計 24 用, * 想獲取密碼框內容調用 getPassword()方法,返回一個 char[] */ char[] password = ()。 return new String(password)。//char 轉換為一個字符串并返回 } /** * 此方法用于讓登錄窗口顯示錯誤信息 * @param message */ public void showError(String message/*error*/){ (message/*error*/)。 ()。 /** * 是 LoginFrame 的屬性 * message 是局部變量,可以將局部變量該為 error,就容易看懂 */ //窗口抖動 final Timer timer = new Timer()。 //獲取當前窗口的坐標,用一個 Point 實例保存,其中有 x 和 y final Point start = ()。 //給 Timer 添加一個任務,用于周期性改變窗口坐標,模擬晃動效果 (new TimerTask(){ int []offset = {1,2,1,0,1,2,1,0}。 int i = 0。 public void run(){ 防災科技學院畢業(yè)設計 25 Point p = getLocation()。//獲取當前窗口坐標 += offset[i++ % ]。//防止 i等于 8 時,數(shù)組下標越界 += offset[i++ % ]。 setLocation(p)。 } }, 0, 50)。//每各 1 秒鐘執(zhí)行一下 run方法 //給 Timer 添加一個任務,用于在若干秒后停止 Timer,停止晃動效果 (new TimerTask(){ public void run(){ setLocation(start)。 ()。 } }, 1000)。 } } 考試模塊的實現(xiàn) 當學生成功登錄后,會自動跳轉到考試界面, 考試界面由 頁面實現(xiàn),它的代碼實 現(xiàn)文件由實體類,以及它的服務類來實現(xiàn)完成。只有考生成功登錄后方可進入本頁面,本頁面會提示用戶的一些基本信息,用戶可自行選擇所要繼續(xù)進行的步驟 ,考生單擊相應的圖片按鈕會觸發(fā)相應的動作。 它的運行界面如圖 44 所示: 防災科技學院畢業(yè)設計 26 圖 44考試界面 部分實現(xiàn)代碼如下: package 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 防災科技學院畢業(yè)設計 27 /** * 菜單窗口 */ public class MenuFrame extends JFrame{ private JLabel info。//用于顯示歡迎信息的 label private ClientContext clientContext。 public void setClientContext(ClientContext clientContext){ = clientContext。 } public MenuFrame(){ init()。 } private void init(){ (基于 Java 的在線考試系統(tǒng) )。 (600,400)。 (null)。 (contentPane())。 (DO_NOTHING_ON_CLOSE)。 (new WindowAdapter(){ @Override public void windowClosing(WindowEvent e) { ()。//不能直接寫 this,直接寫this 指的是 WindowEvent } })。 } /** * 創(chuàng)建主 Panel * @return 防災科技學院畢業(yè)設計 28 */ private JPanel contentPane(){ JPanel panel = new JPanel(new BorderLayout())。 /** * north 一張圖 * center 一個 panel( 4 個圖片按鈕) * south 一個字符串 */ /** * 顯示圖片的步驟: * 1:創(chuàng)建 ImageIcon * 2:創(chuàng)建一個 Label 用于顯示 ImageIcon */ ImageIcon image = new ImageIcon(().getResource())。 JLabel imageLabel = new JLabel(image)。 (imageLabel,)。 (createMenuPane(), )。 (new JLabel(095042309 魏增麗 版 權 所 有 盜版必究,),)。 return panel。 } private JPanel createMenuPane(){ JPanel panel = new JPanel(new BorderLayout())。 /** * north 歡迎文字 * center 存放四個圖片按鈕 */ info = new JLabel(,)。 防災科技學院畢業(yè)設計 29 (info,)。 (createBtnPane(), )。 return panel。 } /** * 創(chuàng)建包含 4 圖片個按鈕的 panel * @return */ private JPanel createBtnPane(){ JPanel panel = new JPanel()。 /** * 創(chuàng)建圖片按鈕的步驟: * 1:創(chuàng)建 ImageIcon * 2:創(chuàng)建 Button,使用重載的構造方法: * JButton(String txt,ImageIcon icon) * 或者后期設置圖片,調用 JButton 的方法 setIcon( ImageIcon icon) */ //開始按鈕 ImageIcon icon = new ImageIcon(().getResource())。 JButton start = new JButton(開始 ,icon)。 //設置文字在中下放:水平中間,垂直下面 ()。 ()。 //分數(shù) 防災科技學院畢業(yè)設計 30 ImageIcon icon2 = new ImageIcon(().getResource())。 JButton result = new JButton(分數(shù) ,icon2)。 ()。 ()。 //考試規(guī)則 ImageIcon icon3 = new ImageIcon(().getResource())。 JButton message = new JButton(考試規(guī)則 ,icon3)。 ()。 ()。 //離開 ImageIcon icon4 = new ImageIcon(().getResource())。 JButton exit = new JButton(離開 ,icon4)。 ()。 ()。 //開始 JButton start = createImageButton(,開始 )。 //添加一個按鈕的點擊事件 (new ActionListener(){ //當開始考試按鈕被點擊后,通知控制器開始考試 public void actionPerformed(ActionEvent e) { ()。 } 防災科技學院畢業(yè)設計 31 })。 //分數(shù) JButton result = createImageButton(,分數(shù) )。 //考試規(guī)則 JButton message = createImageButton(,考試規(guī)則 )。 //離開 JButton exit = cr
點擊復制文檔內容
醫(yī)療健康相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1