Presentation is loading. Please wait.

Presentation is loading. Please wait.

 GUI – Graphic User Interface  Up to now in the programs we have written all output has been sent to the standard output device i.e.: the DOS console.

Similar presentations


Presentation on theme: " GUI – Graphic User Interface  Up to now in the programs we have written all output has been sent to the standard output device i.e.: the DOS console."— Presentation transcript:

1

2  GUI – Graphic User Interface  Up to now in the programs we have written all output has been sent to the standard output device i.e.: the DOS console.  A GUI presents a windows interface to a program. A GUI gives a distinctive “look” and “feel”.

3  GUI Applications and how they are built.  GUI components  java.awt (Abstract Window Toolkit) and javax.swing (Swing Components).

4  Components and the Container object.  As the name suggests the Container object is an object that can contain other GUI objects.  A Frame is a type of container.

5  import javax.swing.*;  import java.awt.*;

6 import javax.swing.*; import java.awt.*; public class JFrameEg extends JFrame { public JFrameEg() { super("JFrameEg: Testing JFrame"); setSize(300,150); setVisible(true); } public static void main(String args[]) { JFrameEg example = new JFrameEg(); }

7

8  Can use GUI components to get input from the user and display output  Components are placed in a container and the container is shown to the user in the form of a window  When you create your component object you must add it to the container, otherwise it will not be visible

9  Components and the layout manager object.  Layout manager and logical arrangement of components


Download ppt " GUI – Graphic User Interface  Up to now in the programs we have written all output has been sent to the standard output device i.e.: the DOS console."

Similar presentations


Ads by Google