Bài giảng "Công nghệ Java - Chương 9: Gui programming - Swing" cung cấp cho người học các kiến thức: What is a Swing, Swing toolkit, Swing overview, walk through this program, adding component, Swing components example,. nội dung chi tiết. | CÔNG NGHỆ JAVA CH9. GUI PROGRAMMING - SWING Quang Dieu Tran PhD. 4/7/2018 1 What is a SWING • Swing is the next-generation GUI toolkit that Sun Microsystems created to enable enterprise development in Java. • Swing is part of a larger family of Java products known as the Java Foundation Classes ( JFC) • The Swing package was first available as an add-on to JDK . – Prior to the introduction of the Swing package, the Abstract Window Toolkit (AWT) components provided all the UI components in the JDK and platforms. 4/7/2018 2 Swing Toolkit • 100% Java implementation of components • Pluggable Look & Feel – customizable for different environments, or – use Java Look & Feel in every environment • Lightweight components – no separate (child) windows for components – allows more variation on component structure – makes Look & Feel possible • Three parts – component set (subclasses of JComponent) – support classes – interfaces 4/7/2018 3 Other APIs 4/7/2018 4 Swing Overview • Swing Components and the Containment Hierarchy – Swing provides many standard GUI components such as buttons, lists, menus, and text areas, windows, tool bars. • Layout Management – Containers use layout managers to determine the size and position of the components they contain. • Event Handling – Event handling is how programs respond to external events, such as the user pressing a mouse button. • Painting – Painting means drawing the component on-screen. – it's easy to customize a component's painting. • More Swing Features and Concepts – include support for icons, actions, Pluggable Look & Feel technology, .