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

正文內(nèi)容

以gui為例了解物件以及event-資料下載頁

2025-07-18 09:05本頁面
  

【正文】 eering 標記 (Label)元件 (3/5) 以下是類別 Label所屬方法的綜合應用程式: 範例程式 (檔名 : 標記測試 .java) 1. //檔名 :標記測試 .java 2. //說明 :各種標記方法之綜合應用 3. import 。 //引入 Applet類別 4. import 。 //引入 Label類別 5. import 。 //引入 GridLayout類別 6. public class 標記測試 extends Applet{ 7. public void init() { 8. Label 標記 1=new Label()。 National Taiwan University Department of Computer Science and Information Engineering 標記 (Label)元件 (4/5) 1. Label 標記 2=new Label(向中靠 )。 2. Label 標記 3=new Label(向右靠 ,2)。 //2可以使用 代 3. 標記 (向左靠 )。 4. 標記 (0)。 //0可以使用 5. 標記 (1)。 //1可以使用 代 6. setLayout(new GridLayout(3,1))。 7. add(標記 1)。 8. add(標記 2)。 9. add(標記 3)。 10. } //方法 :init() 定義區(qū)塊結(jié)束 11. } //類別 :標記測試 定義區(qū)塊結(jié)束 National Taiwan University Department of Computer Science and Information Engineering 標記 (Label)元件 (5/5) 網(wǎng)頁檔案 (檔名:標記測試網(wǎng)頁 .html) 1. html 2. applet code=標記測試 .class width=350 height=100 3. /applet 4. /html 執(zhí)行結(jié)果 (命令視窗指令: appletviewer 標記測試網(wǎng)頁 .html) National Taiwan University Department of Computer Science and Information Engineering 選項 (Checkbox)元件 (1/6) 選項 (Checkbox)元件可用來列出選項並由使用者決定該選項是否被選取 (設為 true)。選項元件也可以設定為屬於同一個 選項群 (CheckboxGroup),被設定為同一個選項群的選項中同時只能有一個被選取,這類似多選一的單選動作,若選項未被設為屬於任何選項群,則他們可任意獨立的被選取。 Checkbox類別的建構(gòu)方法及其常用的方法摘要描述如下: National Taiwan University Department of Computer Science and Information Engineering 選項 (Checkbox)元件 (2/6) National Taiwan University Department of Computer Science and Information Engineering 選項 (Checkbox)元件 (3/6) National Taiwan University Department of Computer Science and Information Engineering 選項 (Checkbox)元件 (4/6) 以下是類別 Checkbox所屬方法的綜合應用範例程式: 範例程式 (檔名 : 選項測試 .java) 1. public class 選項測試 extends Applet{ 2. public void init() { 3. Label 標記 =new Label(請選擇以下一項 )。 4. CheckboxGroup 選項群 =new CheckboxGroup()。 5. Checkbox 選項 1=new Checkbox()。 6. Checkbox 選項 2=new Checkbox(第二項 )。 7. Checkbox 選項 3=new Checkbox(第三項 ,false)。 8. Checkbox 選項 4=new Checkbox(第四項 ,false,選項群 )。 National Taiwan University Department of Computer Science and Information Engineering 選項 (Checkbox)元件 (5/6) 9. Checkbox 選項 5=new Checkbox(第五項 ,選項群 ,false)。 10. 選項 (第一項 )。 11. 選項 (選項群 )。 12. 選項 (選項群 )。 13. 選項 (選項群 )。 14. 選項 (true)。 15. 選項 (false)。 16. setLayout(new GridLayout(6,1))。 17. add(標記 )。 18. add(選項 1)。 National Taiwan University Department of Computer Science and Information Engineering 選項 (Checkbox)元件 (6/6) 19. add(選項 2)。 20. add(選項 3)。 21. add(選項 4)。 22. add(選項 5)。 23. } //方法 :init() 定義區(qū)塊結(jié)束 24. } //類別 :選項測試 定義區(qū)塊結(jié)束 網(wǎng)頁檔案 (檔名:選項測試網(wǎng)頁 .html) 1. html 2. applet code=選項測試 .class width=350 height=100 3. /applet 4. /html 執(zhí)行結(jié)果 (命令視窗指令: appletviewer選項測試網(wǎng)頁 .html) National Taiwan University Department of Computer Science and Information Engineering 選單 (Choice)元件 (1/6) 選單 (Choice)元件與選項 (Checkbox)元件類似,都是可以用來指出元件選取狀態(tài),不同的是 Choice元件是使用下拉式清單的方式來列出所有的選項,而 Checkbox是以一項一項列出的方式來列出所有的選項。 Choice類別的建構(gòu)方法及其他常用的方法摘要如下: National Taiwan University Department of Computer Science and Information Engineering 選單 (Choice)元件 (2/6) National Taiwan University Department of Computer Science and Information Engineering 選單 (Choice)元件 (3/6) National Taiwan University Department of Computer Science and Information Engineering 選單 (Choice)元件 (4/6) 以下是類別 Choice所屬方法的綜合應用程式: 範例程式 (檔名 : 選單測試 .java) 1. import 。 //引入 Label類別 2. import 。 //引入 Choice類別 3. import 。 //引入 GridLayout類別 4. public class 選單測試 extends Applet{ 5. public void init() { 6. Label 標記 =new Label(請選擇以下一項 )。 7. Choice 選單 =new Choice()。 8. 選單 .add(第 1項 )。 National Taiwan University Department of Computer Science and Information Engineering 選單 (Choice)元件 (5/6) 1. 選單 .addItem(第 2項 )。 2. 選單 .addItem(第 3項 )。 3. 選單 .addItem(第 4項 )。 4. 選單 .addItem(第 5項 )。 5. 選單 .insert(第 ,2)。 6. 選單 .select(第 2項 )。 7. 選單 .select(1)。 8. String 訊息字串 =(選單一共有 +選單 .getItemCount()+ 項,由 0開始編號,編號為 5的項目為 +選單 .getItem(5)+)。 9. Label 訊息標記 =new Label(訊息字串 )。 10. add(標記 )。 National Taiwan University Department of Computer Science and Information Engineering 選單 (Choice)元件 (6/6) 1. add(訊息標記 )。 2. add(選單 )。 3. } //方法 :init() 定義區(qū)塊結(jié)束 4. } //類別 :選單測試 定義區(qū)塊結(jié)束 網(wǎng)頁檔案 (檔名:選單測試網(wǎng)頁 .html) 1. html 2. applet code=選單測試 .class width=350 height=100 3. /applet 4. /html 執(zhí)行結(jié)果 (命令視窗指令: appletviewer選單測試網(wǎng)頁 .html) National Taiwan University Department of Computer Science and Information Engineering 清單 (List)元件 (1/7) 清單 (List)元件也是可以用來選取項目的元件,只是 List元件可以將被選擇項目直接以清單的方式表列出來供選擇而已, List元件可以設定為多重選擇。 List類別的建構(gòu)方法及其他常用的方法摘要如下: National Taiwan University Department of Computer Science and Information Engineering 清單 (List)元件 (2/7) National Taiwan University Department of Computer Science and Information Engineering 清單 (List)元件 (3/7) National Taiwan University Department of Computer Science and Information Engineering 清單 (List)元件 (4/7) 以下是類別 List所屬方法的綜合應用程式: 範例程式 (檔名 : 清單測試 .java) 1. //檔名 :清單測試 .java 2. //說明 :清單 (List)類別各種方法之綜合應用 3. import 。 //引入 Applet類別 4. import 。 //引入 Label類別 5. import 。 //引入 List類別 6. import 。 //引入 GridLayout類別 7. public class 清單測試 extends Applet{ 8. public void init() { National Taiwan University Department of Computer Science and Information Engineering 清單 (List)元件 (5/7) 9. Label 標記 =new Label(請選擇以下一項 )。 10. List 清單 =new List(5)。 11. 清單 .setMultipleMode(true)。 12. 清單 .add(第 1項 )。 13. 清單 .add(第 2項 )。 14. 清單 .add(第 3項 )。 15. 清單 .add(第 4項 )。 16
點擊復制文檔內(nèi)容
物理相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1