The document is a presentation on Object-Oriented Programming (OOP) that covers various topics:
1. It outlines the course including graphical user interface components in Java like buttons, labels, text fields using Swing and AWT. It also covers event handling.
2. It discusses character/console user interfaces and command line interfaces.
3. It introduces graphical user interfaces and the Java APIs for creating applications like AWT and Swing.
4. It provides details on specific GUI components like buttons, text areas, labels, checkboxes and radio buttons including their usage and code examples.
5. It also covers other related topics like abstract window toolkit classes, event handling in Java using listeners
java...... it connet
Learn the workings of using intelligent machines for your processes using content-ready Artificial Intelligence PowerPoint Presentation Slides. Processes like learning, reasoning, self-correction, etc. are executed by artificial intelligent machines. Incorporate ready-made artificial intelligence PPT presentation templates and maximize the chance of achieving the organizational goals. This deck comprises of templates such as artificial intelligence objectives, artificial intelligence components, artificial intelligence statistics, artificial intelligence & investment by sector, artificial intelligence in various sectors, core areas of artificial intelligence, artificial intelligence value chain elements, artificial intelligence development phases, artificial intelligence approaches, machine learning (pattern based), machine learning description, machine learning process, machine learning use cases, and more. These templates are customizable. Edit color, text, icon and font size as per your need. Grab easy-to-understand artificial intelligence PowerPoint presentation slideshow and perform tasks associated with intelligent beings. Find solutions to the business problems without human intervention. PrFeatures of these PowerPoint presentation slides:
Presenting artificial intelligence presentation slides. This deck comprises of total of 50 slides. Each slide includes professional visuals with an appropriate content. These templates have been designed keeping the customers requirement in mind. This complete presentation covers all the design elements such as layout, diagrams, icons, and more. This deck has been crafted after an extensive research. You can easily customize each template. Edit the color, text, icon, and font size as per your requirement. Easy to download. Compatible with all screen types and monitors. Supports Google Slides. Premium Customer Support available.
Features of these PowerPoint presentation slides:
Presenting artificial intelligence presentation slides. This deck comprises of total of 50 slides. Each slide includes professional visuals with an appropriate content. These templates have been designed keeping the customers requirement in mind. This complete presentation covers all the design elements such as layout, diagrams, icons, and more. This deck has been crafted after an extensive research. You can easily customize each template. Edit the color, text, icon, and font size as per your requirement. Easy to download. Compatible with all screen types and monitors. Supports Google Slides. Premium Customer Support available.
Features of these PowerPoint presentation slides:
Presenting artificial intelligence presentation slides. This deck comprises of total of 50 slides. Each slide includes professional visuals with an appropriate content. These templates have been designed keeping the customers requirement in mind. This complete presentation covers all th
The Use of Java Swing’s Components to Develop a WidgetWaqas Tariq
Widget is a kind of application provides a single service such as a map, news feed, simple clock, battery-life indicators, etc. This kind of interactive software object has been developed to facilitate user interface (UI) design. A user interface (UI) function may be implemented using different widgets with the same function. In this article, we present the widget as a platform that is generally used in various applications, such as in desktop, web browser, and mobile phone. We also describe a visual menu of Java Swing’s components that will be used to establish widget. It will assume that we have successfully compiled and run a program that uses Swing components.
Your Digital Assistant.
Making complex approach simple. Straightforward process saves time. No more waiting to connect with people that matter to you. Safety first is not a cliché - Securely protect information in cloud storage to prevent any third party from accessing data.
Would you rather make your visitors feel burdened by making them wait? Or choose VizMan for a stress-free experience? VizMan is an automated visitor management system that works for any industries not limited to factories, societies, government institutes, and warehouses. A new age contactless way of logging information of visitors, employees, packages, and vehicles. VizMan is a digital logbook so it deters unnecessary use of paper or space since there is no requirement of bundles of registers that is left to collect dust in a corner of a room. Visitor’s essential details, helps in scheduling meetings for visitors and employees, and assists in supervising the attendance of the employees. With VizMan, visitors don’t need to wait for hours in long queues. VizMan handles visitors with the value they deserve because we know time is important to you.
Feasible Features
One Subscription, Four Modules – Admin, Employee, Receptionist, and Gatekeeper ensures confidentiality and prevents data from being manipulated
User Friendly – can be easily used on Android, iOS, and Web Interface
Multiple Accessibility – Log in through any device from any place at any time
One app for all industries – a Visitor Management System that works for any organisation.
Stress-free Sign-up
Visitor is registered and checked-in by the Receptionist
Host gets a notification, where they opt to Approve the meeting
Host notifies the Receptionist of the end of the meeting
Visitor is checked-out by the Receptionist
Host enters notes and remarks of the meeting
Customizable Components
Scheduling Meetings – Host can invite visitors for meetings and also approve, reject and reschedule meetings
Single/Bulk invites – Invitations can be sent individually to a visitor or collectively to many visitors
VIP Visitors – Additional security of data for VIP visitors to avoid misuse of information
Courier Management – Keeps a check on deliveries like commodities being delivered in and out of establishments
Alerts & Notifications – Get notified on SMS, email, and application
Parking Management – Manage availability of parking space
Individual log-in – Every user has their own log-in id
Visitor/Meeting Analytics – Evaluate notes and remarks of the meeting stored in the system
Visitor Management System is a secure and user friendly database manager that records, filters, tracks the visitors to your organization.
"Secure Your Premises with VizMan (VMS) – Get It Now"
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
Tim Combridge from Sensible Giraffe and Salesforce Ben presents some important tips that all developers should know when dealing with Flows in Salesforce.
java...... it connet
Learn the workings of using intelligent machines for your processes using content-ready Artificial Intelligence PowerPoint Presentation Slides. Processes like learning, reasoning, self-correction, etc. are executed by artificial intelligent machines. Incorporate ready-made artificial intelligence PPT presentation templates and maximize the chance of achieving the organizational goals. This deck comprises of templates such as artificial intelligence objectives, artificial intelligence components, artificial intelligence statistics, artificial intelligence & investment by sector, artificial intelligence in various sectors, core areas of artificial intelligence, artificial intelligence value chain elements, artificial intelligence development phases, artificial intelligence approaches, machine learning (pattern based), machine learning description, machine learning process, machine learning use cases, and more. These templates are customizable. Edit color, text, icon and font size as per your need. Grab easy-to-understand artificial intelligence PowerPoint presentation slideshow and perform tasks associated with intelligent beings. Find solutions to the business problems without human intervention. PrFeatures of these PowerPoint presentation slides:
Presenting artificial intelligence presentation slides. This deck comprises of total of 50 slides. Each slide includes professional visuals with an appropriate content. These templates have been designed keeping the customers requirement in mind. This complete presentation covers all the design elements such as layout, diagrams, icons, and more. This deck has been crafted after an extensive research. You can easily customize each template. Edit the color, text, icon, and font size as per your requirement. Easy to download. Compatible with all screen types and monitors. Supports Google Slides. Premium Customer Support available.
Features of these PowerPoint presentation slides:
Presenting artificial intelligence presentation slides. This deck comprises of total of 50 slides. Each slide includes professional visuals with an appropriate content. These templates have been designed keeping the customers requirement in mind. This complete presentation covers all the design elements such as layout, diagrams, icons, and more. This deck has been crafted after an extensive research. You can easily customize each template. Edit the color, text, icon, and font size as per your requirement. Easy to download. Compatible with all screen types and monitors. Supports Google Slides. Premium Customer Support available.
Features of these PowerPoint presentation slides:
Presenting artificial intelligence presentation slides. This deck comprises of total of 50 slides. Each slide includes professional visuals with an appropriate content. These templates have been designed keeping the customers requirement in mind. This complete presentation covers all th
The Use of Java Swing’s Components to Develop a WidgetWaqas Tariq
Widget is a kind of application provides a single service such as a map, news feed, simple clock, battery-life indicators, etc. This kind of interactive software object has been developed to facilitate user interface (UI) design. A user interface (UI) function may be implemented using different widgets with the same function. In this article, we present the widget as a platform that is generally used in various applications, such as in desktop, web browser, and mobile phone. We also describe a visual menu of Java Swing’s components that will be used to establish widget. It will assume that we have successfully compiled and run a program that uses Swing components.
Your Digital Assistant.
Making complex approach simple. Straightforward process saves time. No more waiting to connect with people that matter to you. Safety first is not a cliché - Securely protect information in cloud storage to prevent any third party from accessing data.
Would you rather make your visitors feel burdened by making them wait? Or choose VizMan for a stress-free experience? VizMan is an automated visitor management system that works for any industries not limited to factories, societies, government institutes, and warehouses. A new age contactless way of logging information of visitors, employees, packages, and vehicles. VizMan is a digital logbook so it deters unnecessary use of paper or space since there is no requirement of bundles of registers that is left to collect dust in a corner of a room. Visitor’s essential details, helps in scheduling meetings for visitors and employees, and assists in supervising the attendance of the employees. With VizMan, visitors don’t need to wait for hours in long queues. VizMan handles visitors with the value they deserve because we know time is important to you.
Feasible Features
One Subscription, Four Modules – Admin, Employee, Receptionist, and Gatekeeper ensures confidentiality and prevents data from being manipulated
User Friendly – can be easily used on Android, iOS, and Web Interface
Multiple Accessibility – Log in through any device from any place at any time
One app for all industries – a Visitor Management System that works for any organisation.
Stress-free Sign-up
Visitor is registered and checked-in by the Receptionist
Host gets a notification, where they opt to Approve the meeting
Host notifies the Receptionist of the end of the meeting
Visitor is checked-out by the Receptionist
Host enters notes and remarks of the meeting
Customizable Components
Scheduling Meetings – Host can invite visitors for meetings and also approve, reject and reschedule meetings
Single/Bulk invites – Invitations can be sent individually to a visitor or collectively to many visitors
VIP Visitors – Additional security of data for VIP visitors to avoid misuse of information
Courier Management – Keeps a check on deliveries like commodities being delivered in and out of establishments
Alerts & Notifications – Get notified on SMS, email, and application
Parking Management – Manage availability of parking space
Individual log-in – Every user has their own log-in id
Visitor/Meeting Analytics – Evaluate notes and remarks of the meeting stored in the system
Visitor Management System is a secure and user friendly database manager that records, filters, tracks the visitors to your organization.
"Secure Your Premises with VizMan (VMS) – Get It Now"
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
Tim Combridge from Sensible Giraffe and Salesforce Ben presents some important tips that all developers should know when dealing with Flows in Salesforce.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Strategies for Successful Data Migration Tools.pptxvarshanayak241
Data migration is a complex but essential task for organizations aiming to modernize their IT infrastructure and leverage new technologies. By understanding common challenges and implementing these strategies, businesses can achieve a successful migration with minimal disruption. Data Migration Tool like Ask On Data play a pivotal role in this journey, offering features that streamline the process, ensure data integrity, and maintain security. With the right approach and tools, organizations can turn the challenge of data migration into an opportunity for growth and innovation.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
CyanicLab, an offshore custom software development company based in Sweden,India, Finland, is your go-to partner for startup development and innovative web design solutions. Our expert team specializes in crafting cutting-edge software tailored to meet the unique needs of startups and established enterprises alike. From conceptualization to execution, we offer comprehensive services including web and mobile app development, UI/UX design, and ongoing software maintenance. Ready to elevate your business? Contact CyanicLab today and let us propel your vision to success with our top-notch IT solutions.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
2. COURSE
OUTLINE
Graphical user interface Components
Introduction to Swing, Control button, Labels, Text
fields, Text area, Checkbox and Radio buttons.
Event handling, The delegation event model (events,
events source and event listener).
Introduction to AWT, AWT classes.
Creating a Window program working with graphics.
Layout manager and manuals control fundamentals.
PAGE 2
3. CUI/CLI (Character/Console User Interface)
A command-line interface (CLI) is a text-based
user interface (UI) used to run programs,
manage computer files and interact with the
computer. Command-line interfaces are also
called command-line user interfaces, console
user interfaces, and character user interfaces.
It is CUI programming in which we can write a
program in one portion and on another side
we obtain the result of the program.
We get results after using only text
components.
PAGE 3
4. GUI (Applications )
It is a screen or interface which interacts with the user
in the sense of a graph.
This interface is called Graphic User Interface.
Here we perform interaction by using visual
components.
Java provides to set of (APIs) Application Programming
interfaces which are given below.
Basically, APIs are the set/ bunches of predefined Classes
in Java library.
PAGE 4
Java Application
APIs
AWT SWING
APIs
5. Graphical user interface
A GUI (Graphical User
Interface) is a type of user
interface that allows users to
interact with a program using
graphical elements such as
buttons, menus, and text boxes. Its
purpose in programming is to
make it easier for users to interact
with a program by providing a
visual representation of the
program's features and functions.
GUIs can enhance the user
experience by providing a more
intuitive and visually appealing
way to interact with a program, as
compared to text-based interfaces
that require users to enter
commands via a command-line
interface.
Introduction to Swing :
Swing is a set of GUI Swing
controls are (graphical user
interface) lightweight and
provide components that are
used to consistent look and feel
create desktop applications in
across different platforms. Java.
It is part of the Java They are
also highly Foundation Classes
(JFC) and customizable, allowing
provides a rich set of controls
developers to create that can be
used to build unique and
visually complex user interfaces
appealing interfaces.
PAGE 5
6. AWT(Abstract Window toolkit)
Basically, AWT is a package of predefined classes in the Java library.
It consists of 12 packages which 2 packages are mostly used in the Java library.
1. Java.Awt Package
This package has furthermore classes which are given below.
GUI_ Component Classes :
It consists of (buttons, labels, a text area, a checkbox, and radio buttons)
GUI_ container Classes :
It consists of (a frame, panel, dialog, window, and scroll panel)
GUI_ Layout Manager :
It consists of (a flow layout, a border layout, and a grid layout)
Custom Graphic Classes :
It consists of ( Graph, color and font)
PAGE 6
1.Java.awt
Package 2.Java.awt
event package
7. 1. Buttons
2. Text Area
3. Labels
4. Checkboxes
5. Radio Buttons
PAE 7
Components of GUI
8. Control
Buttons
“A control button is a control that appears on a form as a
button that users can click to display a menu of commands or
call a dialog.”
“Buttons can be used to initiate an action or trigger an event. For
example, a button labeled "Save" can be used to save data entered into
a form, or a button labeled "Exit" can be used to close a window or quit
the program attribution.”
Control key :
Ctrl stands for "Control Key". It was originally used to send
control characters to terminals.
Type Of Control Button :
Print Screen, Scroll Lock, Pause, Break, Insert, Home, Page
Up, Delete, End, and Page Down are all examples of control
keys.
Examples :
The most frequently used control keys are Ctrl, Alt, the
Windows logo key, and Esc. Function keys. The function keys
are used to perform specific tasks.
PAGE 8
9. Control Buttons
Constructor Description
JButton() It creates a button with no text and
icon.
JButton(String s) It creates a button with the
specified text.
JButton(Icon i) It creates a button with the
specified icon object.
Methods Description
void setText(String s) It is used to set specified text on
button
String getText() It is used to return the text of the
button.
void setEnabled(boolean b) It is used to enable or disable the
button.
void setIcon(Icon b) It is used to set the specified Icon
on the button.
Icon getIcon() It is used to get the Icon of the
button.
void setMnemonic(int a) It is used to set the mnemonic on
the button.
void
addActionListener(ActionListener
a)
It is used to add the action
listener to this object.
PAGE 9
12. Text Area
PAGE 12
● A text area is a multi-line text input control that allows
users to enter and edit large amounts of text. It is
commonly used for tasks such as entering comments,
descriptions, or notes.
● In Java, text areas can be created using the Text Area
class. Text areas can be customized by setting
properties such as font, color, size, and border. They
can also be made read-only or disabled if needed.
13. Labels
A label is a graphical control element
which displays text on a form. It is usually
a static control; having no interactivity. A
label is generally used to ...
• Windows Forms Label controls are used
to display text or images that cannot be
edited by the user. They are used to
identify objects on a form—to provide a
description of what a certain control will
do if clicked, for example, or to display
information in response to a runtime
event or process in your application.
PAGE 13
14. Checkbox
A checkbox is a control that allows users
to select one or more options from a list.
It is commonly used for tasks such as
selecting preferences or features in an
application.
In Java, checkboxes can be created using
the Checkbox class. Checkboxes can be
customized by setting properties such as
font, color, size, and border. They can
also be grouped together using a Button
Group to ensure that only one option is
selected at a time.
PAGE 14
15. Radio Buttons
A radio button is a control that allows
users to select one option from a list. It is
commonly used for tasks such as
selecting a gender or a payment method.
In Java, radio buttons can be created
using the Radio Button class. Radio
buttons can be customized by setting
properties such as font, color, size, and
border. They can also be grouped
together using a Button Group to ensure
that only one option is selected at a time.
PAGE 15
16. Introduction
To AWT
AWT (Abstract Window Toolkit) is an API to develop
Graphical User Interface (GUI) or Windows-based
applications in Java.
AWT provides various components like buttons, labels,
checkboxes, etc. used as objects inside a Java Program.
AWT components use the resources of the operating
system, i.e., they are platform-dependent, which means,
the component's view can be changed according to the
view of the operating system. The classes for AWT are
provided by Java. Awt package for various AWT
components.
PAGE 16
17. AWT Classes
Component Class :
The component class stands at the top of the AWT hierarchy, is an
abstract class that contains all the properties of the component visible on
the screen. The Component object contains information about the
currently selected foreground and background color. It also has
information about the currently selected text color.
Container :
The container is a component that contains other components like
buttons, text fields, labels, etc. However, it is a subclass of the
Component class.
Panel :
The panel can be defined as a container that can be used to hold other
components. However, it doesn't contain the title bar, menu bar, or
border.
Window
A window can be defined as a container that doesn't contain any border
or menu bar. It creates a top-level view. However, we must have a frame,
dialog, or another window for creating a window.
Frame :
The frame is a subclass of Window. It can be defined as a container with
components like buttons, text fields, labels, etc. In other words, AWT
applications are mostly created using frame containers.
PAGE 17
18. Event Handling
Event handling is the process of responding
to user actions or system-generated events
in a GUI application. In GUI programming,
events can include actions such as button
clicks, menu selections, key presses, mouse
movements, and window resize events,
among others. Event handling enables
programmers to write code that responds
to these events and updates the
application's user interface accordingly.
In Java, Event Handling is achieved through
the use of event listeners and event
sources.
An event listener is an object that is
registered to receive notifications when a
particular event occurs.
Event Sources contain information about
the event, such as which component
generated it and what type of event it is.
PAGE 18
19. EventListener
To use event handling in a GUI program, the programmer
typically creates an event listener class that implements
one or more listener interfaces. For example, to handle
button clicks, the programmer can create a class that
implements the Action Listener interface. This class can
then be registered with a button component using the add
Action Listener method, which tells the button to notify the
listener when it is clicked.
PAGE 19
20. EventSource
When the button is clicked, it generates an Action Event
source and sends it to the Action Listener object that is
registered to receive notifications. The Action Listener
object can then use the information in the Action Event
source to perform some action, such as updating a text field
or launching a new window.
PAGE 20
21. Layouts
Layouts in a GUI are used to arrange components (such as buttons, text boxes, and labels) on a
window or container. The layout manager is responsible for determining the size and position of
each component based on the layout rules that have been set.
PAGE 21
22. Creating
Window
Programs
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class Cal extends Applet implements ActionListener
{ String msg=" ";
int v1,v2,result;
TextField t1;
Button b[]=new Button[10];
Button add,sub,mul,div,clear,mod,EQ;
char OP;
public void init(){ Color k=new Color(120,89,90);
setBackground(k);
t1=new TextField(100);
GridLayout gl=new GridLayout(4,5);
setLayout(gl);
for(int i=0;
PAGE 22
23. Layout
Managers
There are several types of layout managers in Java,
each with its own set of rules for arranging
components:
Flow Layout: Components are arranged in a row, from
left to right, until the row is filled, and then a new row
is started.
Border Layout: Components are arranged in regions:
North, South, East, West, and Center. Each region can
contain only one component, and the size of the
component is determined by the size of the region.
Grid Layout: Components are arranged in a grid, with a
fixed number of rows and columns. Each cell in the grid
can contain only one component, and all cells are the
same size.
Box Layout: Components are arranged in a single row
or column, and can be aligned either horizontally or
vertically.
Grid Bag Layout: Components are arranged in a grid
but with more flexibility than the Grid Layout. Each
component can span multiple rows and columns, and
the size of each cell can be adjusted.
PAGE 23
24. PAGE 24
Do you have any questions?
“This presentation was created by “Abu Sufyan”,
Sufisaab098@gmail.com