Presentation is loading. Please wait.

Presentation is loading. Please wait.

Basic Elements of The GUI

Similar presentations


Presentation on theme: "Basic Elements of The GUI"— Presentation transcript:

1 Basic Elements of The GUI
By: Brandon Henderson and James Merino

2 About Graphical User Interface
Commonly used on operating systems such as Windows and Mac Provides a much user-friendly interface for users Are event driven

3 What GUIs look like What Text-Based looks like

4 The Basic Elements of GUIs
JTextField – Input through text Jlabel – Used to display text Jbutton – Input through a mouse click

5 Other more complex GUI elements…
JPanel JComboBox JCheckBox

6 Code snippets JPanel – panel = new Jpanel(parameters go here); JLabel – label = new JLabel(text, additional parameters); JTextField – text = new TextField(text, width, additional parameters); JButton = new Jbutton(text, additional parameters); Requires an action listener method where the code that will be run when the button is pressed can be executed. Adding Elements: panel.add(name of element); button.addActionListener(this);

7 Thanks for listening!


Download ppt "Basic Elements of The GUI"

Similar presentations


Ads by Google