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

正文內(nèi)容

產(chǎn)品庫(kù)存管理系統(tǒng)(1)-資料下載頁(yè)

2025-02-18 05:53本頁(yè)面
  

【正文】 向菜單中添加菜單項(xiàng) (menu)。 setJMenuBar(mbar)。 getContentPane().add(tf)。addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e) {(0)。}})。}public void actionPerformed(ActionEvent e){if(()==newfile) (新建文件 )。if(()==open) (打開(kāi)文件 )。if(()==close) (關(guān)閉文件 )。if(()==quit) (0)。} public static void main(String[] args) JFrame f=new MenuDemo()。 (200,200)。 (true)。 }} 添加菜單到菜單條中添加菜單條到窗口中 對(duì)話(huà)框?qū)υ?huà)框的分類(lèi)模式對(duì)話(huà)框必須在用戶(hù)處理完后才允許用戶(hù)與主窗口繼續(xù)進(jìn)行交互非模式對(duì)話(huà)框 允許用戶(hù)同時(shí)在對(duì)話(huà)框和程 序剩余部分中輸入信息Swing中提供的對(duì)話(huà)框qshowMessageDialog: 顯示一條消息等待用戶(hù)點(diǎn)擊 OK;qshowConfirmDialog: 顯示一條消息并等待確認(rèn);qshowOptionDialog: 顯示一條消息并等待用戶(hù)在一組自定義選項(xiàng) 中的選擇;qshowInputDialog: 顯示一條消息并等待用戶(hù)的輸入。對(duì)話(huà)框的使用 int selection = (, //父窗口“Are you sure?”, // 消息 “Logout”, //對(duì)話(huà)框標(biāo)題, //底部按鈕類(lèi)型)。 //消息類(lèi)型q showMessageDialog、 showInputDialog: 只能有一組標(biāo)準(zhǔn)按鈕, OK和 OK/CANCELq showConfirmDialog: DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION, OK_CANCEL__OPTION四種按鈕形式。 鼠標(biāo)鍵盤(pán)事件q設(shè)計(jì)實(shí)現(xiàn)一個(gè)電子白板,可以用鼠標(biāo)在上面繪畫(huà),可用鍵盤(pán)在上面寫(xiě)字。 任務(wù) 9鼠標(biāo)事件 MouseEventq鼠標(biāo)事件 MouseEvent對(duì)應(yīng)于接口 MouseListener。鼠標(biāo)事件 MouseMotionEventq鼠標(biāo)事件 MouseMotionEvent對(duì)應(yīng)于接口MouseMotionListener。鍵盤(pán)事件q鍵盤(pán)事件 KeyEvent對(duì)應(yīng)的監(jiān)聽(tīng)器接口KeyListener。 任務(wù) 9:實(shí)現(xiàn)public class MouseAndKeyDemo extends JFrame{int lastX=0,lastY=0。public MouseAndKeyDemo(){super(MouseAndKey)。getContentPane().setBackground()。setForeground()。addMouseListener(new MouseAdapter(){public void mouseEntered(MouseEvent e){ requestFocus()。 //請(qǐng)求界面獲取焦點(diǎn) record((),())。}public void mousePressed(MouseEvent e){ record((),())。}})。 addMouseMotionListener(new MouseMotionAdapter(){public void mouseDragged(MouseEvent e){ int x=()。 int y=()。 Graphics g=getGraphics()。 (lastX,lastY,x,y)。 //畫(huà)線(xiàn) record(x,y)。 }})。 addKeyListener(new KeyAdapter(){ public void keyTyped(KeyEvent e){ String s=(())。 getGraphics().drawString(s,lastX,lastY)。 record(lastX+12,lastY)。 }})。setSize(300,150)。setVisible(true)。setDefaultCloseOperation()。}public void record(int x,int y){lastX=x。lastY=y。} public static void main(String[] args) { new MouseAndKeyDemo()。 }} 拓展性知識(shí)借助網(wǎng)絡(luò)和 Jdk的幫助文檔,自主學(xué)習(xí)swing包中其他常用組件的使用。課下實(shí)戰(zhàn)q編程:編寫(xiě)成人標(biāo)準(zhǔn)身高和體重互查程序。身高和體重在兩個(gè)不同的文本框中輸入,要求輸入一個(gè),輸出另一個(gè)。用一個(gè)按鈕啟動(dòng)互查。 互查公式為: 體重 =身高 100q編程實(shí)現(xiàn)一個(gè)復(fù)雜的計(jì)算器。q創(chuàng)建記事本的程序,實(shí)現(xiàn)記事本的相應(yīng)功能。下課了!演講完畢,謝謝觀
點(diǎn)擊復(fù)制文檔內(nèi)容
化學(xué)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1