Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Chapter 16: Creating Windows. 2 Basics of GUI Programming How to create a Window. TryWindow.java You always need a JFrame component before creating.

Similar presentations


Presentation on theme: "1 Chapter 16: Creating Windows. 2 Basics of GUI Programming How to create a Window. TryWindow.java You always need a JFrame component before creating."— Presentation transcript:

1 1 Chapter 16: Creating Windows

2 2 Basics of GUI Programming How to create a Window. TryWindow.java You always need a JFrame component before creating a window You can use a ToolKit object to get information about the environment in which your program is running or a method in the GraphicsEnvironment class Ex1: Using Toolkit\TryWindow.java EX2: Using GraphicsEnvironment\TryWindow.java Point object. Ex: PlayingPoints.java Changing Color and Cursor. Ex: TryWindow.java

3 3 Basics of GUI Programming (Cont.) Getting Information from the local graphics environment. Ex: SysInfo.java Swing Components: JButton, JMenu, JLabel, JTextArea, JTextField, etc. Layout Managers: FlowLayout. Ex TryFlowLayout.java Ex: TryApplet.java BorderLayout. Ex:TryBorderLayout.java CardLayout: Ex: TryCardLayout.java (Applet) GridLayout: Ex: TryGridLayout.java Creating Menus: Ex: Sketcher.java


Download ppt "1 Chapter 16: Creating Windows. 2 Basics of GUI Programming How to create a Window. TryWindow.java You always need a JFrame component before creating."

Similar presentations


Ads by Google