Gui in java
-
Upload
gaurav-raj -
Category
Design
-
view
66 -
download
0
Transcript of Gui in java
GUI in Java
HALDIA INSTITUTE OF TECHNOLOGY
A presentation on
Presented by: GAURAV RAJ Roll no: 14/CS/33 Date: 02/03/2017
What is GUI ?
GUI is an abbreviation for Graphical User Interface.
It is an interface that allows user to communicate with programs through graphical icons with some visual effects.
It is helpful in getting rid of those text-based interfaces used to perform various tasks.
Definition
An example of text-based interface
An example of GUI
• Choosing Windows over other operating systems is a result of better GUI provided by the respective company.
Text – based interface Vs GUI
Examples of GUI
Terms in GUI
User interface components Content Pane Frame Layout Manager Panel Event - Driven programming
Layout Manager
Flow Layout Border Layout Grid layout
Flow Layout: The position of components depends on dimensions of the content pane.
Border Layout: Directions like north, south, west and east as well as center are used to position various components on a pane.
Grid Layout: ‘m’ number of components are divided into ‘n’ number of rows making their positions fixed till there is no change in ‘m’ or ‘n’.
The position of components will change on any change in dimensions of the frame
Here positions of components are fixed in various directions and at center.
Here 6 components (3 labels and 3 text-fields) are divided into 3 rows and 2 columns thus making their positions fixed.
Various componentsFrame Buttons
Panel 1 Panel 2
Button Panel
Label Text Field
Graphics Whenever a component is added to a frame, an instance of
‘Graphics’ class is automatically created. It is the graphics object that invokes paintComponent( )
method to draw the components on the panel. A graphics object is like a pencil or a paintbrush which is
responsible for drawing.
Event – Driven Programming Actions to be taken after clicking a mouse button, pressing a keyboard button, or dragging a mouse come under this category. There are various interfaces known as listeners defined for various button operations. Implementation of these listeners decides actions to be taken on those button operations.
Conclusion Definition of GUI Applications of GUI Various components of GUI Various terminologies Graphics & Event – Driven programming
THANK YOU