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

正文內容

第6章回顧applet-預覽頁

2025-08-13 12:22 上一頁面

下一頁面
 

【正文】 implements ActionListener { String question[]={Java test question1\n A. choice1\n \n ,Java test question2\n A. good\n B. bad\n C. luck}。 Label hint。 public void init() { setLayout(new BorderLayout())。 Panel p=new Panel()。i。 Panel p2=new Panel()。 (hint)。 (previous)。 (this)。i。 例 711(續(xù) 4)解答判定 } else if (()==next) { if (bh) bh++。 } } } 例 711(續(xù) 5) //翻動試題 3. 單選按鈕 (CheckBoxGroup) 使用復選框組,可以實現單選框的功能。 Checkbox i = new Checkbox(斜體 , false, style)。 ? setState()設置某個單選按鈕為選中狀態(tài)。 public class ChangeColor extends Applet implements ItemListener { String des[]={紅色 ,蘭色 ,綠色 ,白色 ,灰色 }。 for (int i=0。 add(one)。 } 根據選擇的按鈕設置 drawColor的顏色值 public void itemStateChanged(ItemEvent e){ Checkbox temp=(Checkbox)()。 repaint()。 相關方法: ? select(int index)和 select(String item):強制將某列表項定為選中狀態(tài); ? add(String item) 和 insert(String item,int index):添加新元素到列表中 ? remove(int index)和 remove(String item):刪除某個列表元素 ? removeAll():刪除所有元素。 public class ChangeColor2 extends Applet implements ItemListener{ String des[]={紅色 ,蘭色 ,綠色 ,白色 ,灰色 }。i。 } 例 713(續(xù)) public void itemStateChanged(ItemEvent e){ Choice temp=(Choice)()。 break。 列表可以產生兩類事件: ? ItemEvent類選擇事件,當單擊某選項時觸發(fā)。 例 714 假設有一個發(fā)文系統(tǒng),需要將一份文件發(fā)給多個單位 import .*。 Label result。i。 (this)。 List temp = (List)(())。i++) str = str + sList[i] + 。 ? 有關說明: ( 1)第 1個參數為常量,代表水平滾動條,如果是垂直滾動條,則為 ; ( 2)第 2個參數代表為初始值; ( 3)第 3個參數代表滾動條的滑塊長度; ( 4)第 5個參數分別代表滾動條的最小和最大值,由于滾動條滑塊要占一定寬度,所以滾動條的實際最大值 =最大值 滑塊長度。 ? 點擊下方引取下移 ? 上移 ? 拖動滑塊 ? 點擊下三角按鈕 ? 點了上三角按鈕 設定和獲取滾動條滑塊的移動增量值 ? void setUnitIncrement(int) //指定單位增量 ? void setBlockIncrement(int) //指定塊增量 ? int getUnitIncrement() //獲取單位增量 ? int getBlockIncrement() //獲取塊增量 例 715 利用滾動條設計一個調色控制板用來調整任意部件的顏色 import .*。 (1)。 Scrollbar blueSlider = new colorBar()。 (new GridLayout(3,2,1,1))。 (greenSlider)。 add(mycanvas)。 (this)。 value3 = ()。 add(Center,new ColorPanel())。 public Point getPoint() :返回 Point對象 ,也即鼠標事件發(fā)生的坐標點。 import .*。 } public void paint(Graphics g) { //在鼠標位置畫紅色小圓 ()。 repaint()。 – public void keyReleased(KeyEvent e) 某鍵被釋放時執(zhí)行。 import 。 public void init() { setBackground()。 addKeyListener(this)。 (0,0,width1,height1)。 (squareLeft, squareTop, SQUARE_SIZE, SQUARE_SIZE)。 || ch == 39。 } else if (ch == 39。) { squareColor = 。 || ch == 39。 } else if (ch == 39。) { squareColor = 。 if (squareLeft 3) squareLeft = 3。 repaint()。 } else if (key == ) { squareTop += 8。 ⑴ 創(chuàng)建菜單條( MenuBar) 例: MenuBar m_MenuBar = new MenuBar()。 (mi_Editcopy)。o39。o39。 ⑹ 在監(jiān)聽者的 actionPerformed(ActionEvent e)方法中實現處理代碼 通過 ()或 ()判斷事件源,為每個菜單項編寫對應的功能代碼。 public class Menudemo extends Frame implements ActionListener{ TextArea ta。 setMenuBar(menubar)。 MenuItem quit = new MenuItem(Quit, new MenuShortcut())。 (new WindowAdapter() { public void windowClosing(WindowEvent e) { Frame frm=(Frame)(())。 (this)。 } else { (read a file content and write here)。 ( 3)通過執(zhí)行部件的 add方法將彈出式菜單附著在某個組件或容器上; ( 4)在該組件或容器注冊鼠標事件監(jiān)聽者(MouseListener); ( 5)重載 processMouseEvent(MouseEvent e)方法判斷是否觸發(fā)彈出菜單,如果是點擊鼠標右鍵,則調用彈出式菜單的 show(),把它自身顯示在用戶鼠標點擊的位置。 public class MenuScribble extends Applet implements ActionListener { protected int lastx, lasty。 String labels[]={Clear, Red, Green, Blue, Black}。 (this)。 lasty = ()。 (color)。 } })。 else (e)。 (0, 0, ().width,().height)。 else if ((Black)) color = 。 ? 默認情況下為非模式對話框,已經創(chuàng)建的對話框也可以用以下方法檢查和設置模式。 ColorPanel m。 setLayout(new FlowLayout())。 例 721 續(xù) (new WindowAdapter() { public void windowClosing(WindowEvent e) { ()。 (South,b)。 例 721 續(xù) setSize(300,300)。 } })。 常用的 FileDialog方法如下: ? String getDirectory() : 返回對話框選擇的目錄 ? String getFile(): 返回對話框選擇的文件名,當對話框未選文件時返回 null。 2)設有一批英文單詞存放在一個數組中,編制一個圖形界面程序瀏覽
點擊復制文檔內容
公司管理相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1