1 / 12

標準類別庫中包含了製作視窗程式的功能,而彙整了此功能的套 件就叫作 Swing 。本章就要開始教您如何撰寫具有視窗的 Swing 程式。

第 19 章 Swing 的基礎知識. GUI 元件 容器 覆寫 事件 事件來源 事件傾聽者. 標準類別庫中包含了製作視窗程式的功能,而彙整了此功能的套 件就叫作 Swing 。本章就要開始教您如何撰寫具有視窗的 Swing 程式。. 撰寫 Swing Applet. 關於元件與容器. 像標籤這樣的 Swing 零件就叫作元件 ( JComponent ) 。另外,能夠包含元件的元件就叫作容器 (Co n t a i n e r ) 。

yoshe
Télécharger la présentation

標準類別庫中包含了製作視窗程式的功能,而彙整了此功能的套 件就叫作 Swing 。本章就要開始教您如何撰寫具有視窗的 Swing 程式。

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 第19章 Swing的基礎知識 • GUI • 元件 • 容器 • 覆寫 • 事件 • 事件來源 • 事件傾聽者 標準類別庫中包含了製作視窗程式的功能,而彙整了此功能的套 件就叫作Swing。本章就要開始教您如何撰寫具有視窗的Swing 程式。

  2. 撰寫Swing Applet

  3. 關於元件與容器 像標籤這樣的Swing 零件就叫作元件( JComponent )。另外,能夠包含元件的元件就叫作容器(Co n t a i n e r )。 在這段程式碼中,標籤就是元件、而Ap p l e t 就是容器。Applet 中都會有一個名為內容窗格(content pane) 的中間容器,並進行在中間容器內新增元件的處理。

  4. 使用其它的元件

  5. 使用複數個元件

  6. 關於事件的處理機制

  7. 關於按下按鈕時的程式碼

  8. 關於負責事件處理的類別

  9. 關於點按滑鼠時的程式碼

  10. 關於滑鼠進出時的程式碼

  11. 關於輸出按鍵時的程式碼

  12. 事件處理的種類

More Related