tailieunhanh - Lecture Software construction - Lecture 11: GUI programming in java
In this chapter, the following content will be discussed: GUI programming concepts, GUI design concepts, GUI programming concepts in Java, Java GUI history: the AWT, swing in Java, running a swing application, basic GUI programming concepts in Java,. | Software Construction Lecture 11 GUI Programming in Java GUI Programming Concepts conventional programming: sequence of operations is determined by the program what you want to happen, happens when you want it event-driven programming: sequence of operations is determined by the user’s interaction with the application’s interface anything that can happen, happens at any time GUI Design Concepts Principles of good GUI Design IBM's Design concepts Saul Greenberg's HCI pages Tim's HCI notes GUI Programming Concepts in Java Java GUI has components Windows GUI has controls Unix GUI has widgets examples: labels, buttons, check boxes, radio buttons, text input boxes, pull down lists Swing components: JLabel, JButton, JCheckBox, JRadioButton, JTextField, JTextArea, JComboBox Java GUI history: the AWT AWT(JDK , ): Abstract Window Toolkit package: , heavyweight components using native GUI system elements used for applets until most browsers . | Software Construction Lecture 11 GUI Programming in Java GUI Programming Concepts conventional programming: sequence of operations is determined by the program what you want to happen, happens when you want it event-driven programming: sequence of operations is determined by the user’s interaction with the application’s interface anything that can happen, happens at any time GUI Design Concepts Principles of good GUI Design IBM's Design concepts Saul Greenberg's HCI pages Tim's HCI notes GUI Programming Concepts in Java Java GUI has components Windows GUI has controls Unix GUI has widgets examples: labels, buttons, check boxes, radio buttons, text input boxes, pull down lists Swing components: JLabel, JButton, JCheckBox, JRadioButton, JTextField, JTextArea, JComboBox Java GUI history: the AWT AWT(JDK , ): Abstract Window Toolkit package: , heavyweight components using native GUI system elements used for applets until most browsers supported JRE Swing in Java Swing(Java 2, JDK ) lightweight components that do not rely on the native GUI or OS “look and feel” of Swing components are identical on different platforms can be customized Swing inherits from AWT AWT still used for events, layouts Swing Components in Java advanced GUI support. . drag-and-drop package names: , components inherit from JComponent components are added to a top-level container: JFrame, JDialog, or JApplet. running a Swing application java MySwingClass the option sets the system property "" to "true" to enable anti-aliasing for every JComponent javaw runs a GUI without the console window Basic GUI Programming Steps in Java declare a container and components add components to one or more containers using a layout manager register event listener(s) with the components create event listener method(s) Basic GUI Programming Concepts in Java Example: .
đang nạp các trang xem trước