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

正文內(nèi)容

java語言程序設(shè)計(下)ppt-文庫吧資料

2025-01-25 08:08本頁面
  

【正文】 ? public void add(String s, int n) ? public void remove(int n) ? public void removeAll() ? public int getSelectedIndex() ? public String getSelectedItem() ? 事件響應(yīng) ? (接口 ) ? (接口 ) 72 下拉列表和滾動條 ? 下拉列表 (Choice) ? 創(chuàng)建下拉列表 ? public Choice() ? 常用方法 ? public int getSelectedIndex() ? public String getSelectedItem() ? public void select(int index) ? public void select(String item) ? public void add(String s) ? public void add(String s, int index) ? public void remove(int index) ? public void remove(String item) ? public void removeAll() ? 事件響應(yīng) ? (接口 ) 73 下拉列表和滾動條 ? 滾動條 (Scrollbar) ? 創(chuàng)建滾動條 ? public Scrollbar(int orientation, int value, int visible, int minimum, int maximum) ? 常用方法 ? public void setUnitIncrement(int n) ? public void setBlockIncrement(int n) ? public int getUnitIncrement() ? public int getBlockIncrement() ? public int getValue() ? 事件響應(yīng) ? (接口 ) ? void adjustmentValueChanged(AdjustmentEvent e) 74 使用下列列表的例子 import .*。 (“浮點數(shù) =” + f, 20, 150)。 repaint()。 f = ((())).floatValue()。 add(text3)。 text3 = new TextField(“”, 30)。 lab3 = new Label(“輸入字符串 : ”)。 (this)。 add(lab2)。 add(text1)。 text1 = new TextField(“0”, 30)。 public void init() { lab1 = new Label(“輸入整形數(shù) : ”)。 int i。 TextField text1, text2, text3。 import .*。 } } 64 使用標(biāo)簽的例子 Html Body Applet code= width=500 height=300 /Applet /Body /Html 65 文本框和文本區(qū) ? 文本框 (TextField) ? TextComponent類的子類 ? 創(chuàng)建文本框 ? public TextField() ? public TextField(int size) ? public TextField(String s) ? public TextField(String s, int size) ? 常用方法 ? public void setText(String s) ? public String getText() ? public void setEchochar(char c) ? public void setEditable(boolean b) ? 事件響應(yīng) ? (接口 ) ? (接口 ) 66 文本框和文本區(qū) ? 文本區(qū) (TextArea) ? TextComponent類的子類 ? 創(chuàng)建文本區(qū) ? public TextArea() ? public TextArea(String s) ? public TextArea(int rows, int columns) ? public TextArea(String s, int rows, int columns) ? public TextArea(String s, int rows, int columns, int scrollbars) ? SCROLLBARS_BOTH, SCROLLBARS_NONE ? SCROLLBARS_VERTICAL_ONLY ? SCROLLBARS_HORIZONTAL_ONLY ? 常用方法 ? public void append(String s) ? public void insert(String s, int index) ? pubilc void replaceRange(String s, int start, int end) ? 事件響應(yīng) ? (接口 ) ? void textValueChanged(TextEvent e) 67 使用文本框的例子 import .*。 add(lab2)。 add(lab1)。 text1 = new TextField(10)。 ()。 public void init() { lab1 = new Label(“輸入姓名” )。 public class Exam5_3 extends Applet { Label lab1, lab2。 ? Swing組件 (.*) 61 按鈕和標(biāo)簽 ? 按鈕 (Button) ? 創(chuàng)建按鈕 ? public Button() ? public Button(String label) ? 常用方法 ? public String getLabel() ? public void setLabel(String label) ? public void setActionCommand(String s) ? public String getActionCommand(String s) ? 事件響應(yīng) ? (接口 ) ? void actionPerformed(ActionEvent e) 62 按鈕和標(biāo)簽 ? 標(biāo)簽 (Label) ? 創(chuàng)建標(biāo)簽 ? public Label() ? public Label(String s) ? public Label(String s, int alignment) ? 常用方法 ? public String getText() ? public void setText(String s) ? public void setAlignment(int alignment) ? 事件響應(yīng) ? 不引發(fā)事件 63 使用標(biāo)簽的例子 import .*。 } } class Eavesdropper implements ActionListener { ... public void actionPerformed(ActionEvent e) { (() + newline)。 (new Eavesdropper(bottomTextArea))。 } } 57 事件處理 ? 多個監(jiān)聽器 (Listener)多個組件 public class MultiListener ... implements ActionListener { ... (this)。 } public void mouseClicked(MouseEvent e) { saySomething(Mouse clicked ( of clicks: “ + () + ), e)。 } public void mouseEntered(MouseEvent e) { saySomething(Mouse entered, e)。 } public void mouseReleased(MouseEvent e) { saySomething(Mouse released。 … } public void mousePressed(MouseEvent e) { saySomething(Mouse pressed。 } public void actionPerformed(ActionEvent e) { (“Click me once”)。 getContentPane().add(button, )。 public class Beeper extends JApplet implements ActionListener { JButton button。 import .*。 (true)。 } })。 (label)。 public class HelloWorldAWT { public static void main(String[] args) { Frame f = new Frame(AWT1)。 } } import .*。 (200, 200)。 (new WindowAdapter() { public void windowClosing(WindowEvent e) { (0)。 JLabel label = new JLabel(Hello!)。 import .*。 } } 34 Applet小程序 Html Body Applet code= width=500 height=300 /Applet /Body /Html 35 演示圖像 4. 動畫 ? 創(chuàng)建 Image類的對象數(shù)組 ? drawImage() ? ()方法 ? repaint() 5. 播放聲音 ? public void play(URL url) ? public AudioClip getAudio(URL url) ? play()方法 /loop()方法 /stop()方法 36 第四章 結(jié)束! 37 1. 概述 2. 事件處理 3. 基本控制組件 4. 布局設(shè)計 5. 常用容器組件 第五章 圖形用戶界面設(shè)計 38 概述 ? 用戶界面 (User Interface) ? 用戶與計算機系統(tǒng) (各種程序 )交互的接口 39 Graphical User Interface Natural User Interface 1990 GUI Multiple Windows Menus 1995 Inter Hyperlinks Search Engines Digital Decade XML Web Services Smart devices Natural Language Multimodal (speech, ink…) Personal Assistant Command line 1985 PC User Interface Evolution ? Kai Fu Lee in 2022 40 概述 ? Java GUI的發(fā)展 1. AWT (Java ) ? AWT (Abstract Window Toolkit): 抽象窗口工具包 ? 概念 ?設(shè)計 ?實現(xiàn) (about 1 month) ? 字體設(shè)計 (四種 ), 界面顯示 (二流水準(zhǔn) ) 2. Swing (Lightweight Components, Java ) ? Swing was the code name of the project that developed the new ponents ? Swing API (附加包 , Addon package) 3. JFC (Java 2) ? JFC (Java Foundation Classes): Java基礎(chǔ)類 ? JFC enpass a group of features to help people build graphical user interfaces (GUIs). ? JFC 是指 包含在 Java 2 平臺內(nèi)的一整套圖形和用戶界面技術(shù) ? JFC was first announced at th
點擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1