1 / 6

SEEM3460 Tutorial

SEEM3460 Tutorial. GUI in Java. Some Basic GUI Terms. Component (Control in some languages) the basic GUI unit something visible s omething that user can make action with Container c omponent that can hold other components a component hierarchy can be formed

bat
Download Presentation

SEEM3460 Tutorial

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. SEEM3460 Tutorial GUI in Java

  2. Some Basic GUI Terms • Component (Control in some languages) • the basic GUI unit • something visible • something that user can make action with • Container • component that can hold other components • a component hierarchy can be formed • Frame (Form in some languages) • window that brings components to the display

  3. Typical Components • Button • Label • TextField (TextBox) • Panel • List (ListBox) • Choice (ComboBox) • CheckBox • CheckBoxGroup (RadioButton) • Menu • …

  4. Typical Properties of a GUI unit • location • size • border (color, width, style) • background color • foreground color • text • font (name, size, style) • components (only for containers) • visible: determine whether it is displayed • graphic: for custom drawing

  5. Action and Event • Different components captures different actions (e.g. a click, a key press, a mouse move) • Actions or program statements raise events • Event handler/action listener are classes which contain methods (actionPerformed(Event) for Java) registered to be invoked when events are raised. This is called event handling • A component can register an action listener to handle all actions it captures • The flow of GUI programs are event-based

  6. Layout: Special from Java • Save programmer’s effort to arrange components by automatically setting the right size and position • Most typical Layout Managers: • FlowLayout: Left to right • GridLayout: N by M • BorderLayout: N, E, S, W, Center

More Related