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

正文內(nèi)容

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

2025-02-18 05:53本頁面
  

【正文】 向菜單中添加菜單項(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) (打開文件 )。if(()==close) (關(guān)閉文件 )。if(()==quit) (0)。} public static void main(String[] args) JFrame f=new MenuDemo()。 (200,200)。 (true)。 }} 添加菜單到菜單條中添加菜單條到窗口中 對話框?qū)υ捒虻姆诸惸J綄υ捒虮仨氃谟脩籼幚硗旰蟛旁试S用戶與主窗口繼續(xù)進(jìn)行交互非模式對話框 允許用戶同時(shí)在對話框和程 序剩余部分中輸入信息Swing中提供的對話框qshowMessageDialog: 顯示一條消息等待用戶點(diǎn)擊 OK;qshowConfirmDialog: 顯示一條消息并等待確認(rèn);qshowOptionDialog: 顯示一條消息并等待用戶在一組自定義選項(xiàng) 中的選擇;qshowInputDialog: 顯示一條消息并等待用戶的輸入。對話框的使用 int selection = (, //父窗口“Are you sure?”, // 消息 “Logout”, //對話框標(biāo)題, //底部按鈕類型)。 //消息類型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)鍵盤事件q設(shè)計(jì)實(shí)現(xiàn)一個(gè)電子白板,可以用鼠標(biāo)在上面繪畫,可用鍵盤在上面寫字。 任務(wù) 9鼠標(biāo)事件 MouseEventq鼠標(biāo)事件 MouseEvent對應(yīng)于接口 MouseListener。鼠標(biāo)事件 MouseMotionEventq鼠標(biāo)事件 MouseMotionEvent對應(yīng)于接口MouseMotionListener。鍵盤事件q鍵盤事件 KeyEvent對應(yīng)的監(jiān)聽器接口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()。 //請求界面獲取焦點(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)。 //畫線 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()。 }} 拓展性知識借助網(wǎng)絡(luò)和 Jdk的幫助文檔,自主學(xué)習(xí)swing包中其他常用組件的使用。課下實(shí)戰(zhàn)q編程:編寫成人標(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)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1