SlideShare a Scribd company logo
Swing Components
1. What are Swing Components
2. Top Level Containers
3. General Purpose Containers
4. Basic Controls
5. Uneditable Information Displays
6. Interactive Displays of Highly Formatted Information
* Swing components are basic building blocks of an application.
* Swing has a wide range of various components, including buttons,
check boxes, sliders, and list boxes.
1. What are Swing Components
1. Top Level Containers
* Every program with a Swing GUI must contain at least one top-level Swing
container that provides the support that Swing components need to perform
their painting and event handling.
* Swing provides three generally useful top-level container classes:
1. JFrame 2. JDialog 3. JApplet.
* Each JFrame object implements a single main window, and each JDialog
implements a secondary window (a window that's dependent on another
window). Each JApplet object implements an applet's display area within a
browser window.
When using these classes, you should keep these facts in
mind:
• To appear onscreen, every GUI component must be part of a
containment hierarchy. Each containment hierarchy has a top-level
container as its root.
• Each top-level container has a content pane that, generally speaking,
contains the visible components in that top-level container's GUI.
• You can optionally add a menu bar to a top-level container. The
menu bar is positioned within the top-level container, but outside
the content pane.
Here's a picture of a frame created by an application.
The frame contains a green menu bar (with no menus)
and, in the frame's content pane, a large blank, yellow
label.
• The Source
Of previous example
2. General Purpose Containers
1. Typically used to collect Basic Controls (JButton,
JChoiceBox…)
2. Added to layout of top-level containers
JPanel
JFrame
3. Basic Controls
4. Uneditable Information Displays
5. Interactive Displays of Highly
Formatted Information
MVC
Architecture
Swing components & MVC Architecture

More Related Content

Similar to Swing components & MVC Architecture (20)

PDF
Swing
Fahim Khan
 
PDF
Z blue introduction to gui (39023299)
Narayana Swamy
 
PDF
Ebook Pdf O Reilly Java Swing
owambacq
 
PPTX
Java_unit_1_AWTvsSwing.pptxn k , jlnninikkn
zmulani8
 
PDF
Lecture 19
Debasish Pratihari
 
PPT
Java Swing
Shraddha
 
PPT
Swing_Introduction.ppt
Satyanandaram Nandigam
 
PPTX
swings.pptx
Parameshwar Maddela
 
PDF
Tycs advance java sem 5 unit 1,2,3,4 (2017)
WE-IT TUTORIALS
 
PPTX
JavaSwingndAWTProgrammingforBeginner.pptx
cluttertans
 
PPTX
Java Swing
Arkadeep Dey
 
PPT
Swing
Jaydeep Viradiya
 
PPTX
Graphical User Interface (GUI)
SAGARDAVE29
 
PPT
Java lecture
Nataraj Dg
 
PPTX
Unit 4_1.pptx JDBC AND GUI FOR CLIENT SERVER
Salini P
 
PPTX
java2 (3).pptxbsbsbnsjsjjsshshshwhwhwhwhhwhw
JayPatil347597
 
PDF
Java GUI Programming for beginners-graphics.pdf
PBMaverick
 
PPT
GUI Programming In Java
yht4ever
 
PPTX
Chapter 11.1
sotlsoc
 
PPTX
SWING USING JAVA WITH VARIOUS COMPONENTS
bharathiv53
 
Swing
Fahim Khan
 
Z blue introduction to gui (39023299)
Narayana Swamy
 
Ebook Pdf O Reilly Java Swing
owambacq
 
Java_unit_1_AWTvsSwing.pptxn k , jlnninikkn
zmulani8
 
Lecture 19
Debasish Pratihari
 
Java Swing
Shraddha
 
Swing_Introduction.ppt
Satyanandaram Nandigam
 
swings.pptx
Parameshwar Maddela
 
Tycs advance java sem 5 unit 1,2,3,4 (2017)
WE-IT TUTORIALS
 
JavaSwingndAWTProgrammingforBeginner.pptx
cluttertans
 
Java Swing
Arkadeep Dey
 
Graphical User Interface (GUI)
SAGARDAVE29
 
Java lecture
Nataraj Dg
 
Unit 4_1.pptx JDBC AND GUI FOR CLIENT SERVER
Salini P
 
java2 (3).pptxbsbsbnsjsjjsshshshwhwhwhwhhwhw
JayPatil347597
 
Java GUI Programming for beginners-graphics.pdf
PBMaverick
 
GUI Programming In Java
yht4ever
 
Chapter 11.1
sotlsoc
 
SWING USING JAVA WITH VARIOUS COMPONENTS
bharathiv53
 

Recently uploaded (20)

PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
PPTX
Mathematics 5 - Time Measurement: Time Zone
menchreo
 
PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PDF
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
Dimensions of Societal Planning in Commonism
StefanMz
 
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
community health nursing question paper 2.pdf
Prince kumar
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
Mathematics 5 - Time Measurement: Time Zone
menchreo
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
Ad

Swing components & MVC Architecture

  • 1. Swing Components 1. What are Swing Components 2. Top Level Containers 3. General Purpose Containers 4. Basic Controls 5. Uneditable Information Displays 6. Interactive Displays of Highly Formatted Information
  • 2. * Swing components are basic building blocks of an application. * Swing has a wide range of various components, including buttons, check boxes, sliders, and list boxes. 1. What are Swing Components
  • 3. 1. Top Level Containers * Every program with a Swing GUI must contain at least one top-level Swing container that provides the support that Swing components need to perform their painting and event handling. * Swing provides three generally useful top-level container classes: 1. JFrame 2. JDialog 3. JApplet. * Each JFrame object implements a single main window, and each JDialog implements a secondary window (a window that's dependent on another window). Each JApplet object implements an applet's display area within a browser window.
  • 4. When using these classes, you should keep these facts in mind: • To appear onscreen, every GUI component must be part of a containment hierarchy. Each containment hierarchy has a top-level container as its root. • Each top-level container has a content pane that, generally speaking, contains the visible components in that top-level container's GUI. • You can optionally add a menu bar to a top-level container. The menu bar is positioned within the top-level container, but outside the content pane.
  • 5. Here's a picture of a frame created by an application. The frame contains a green menu bar (with no menus) and, in the frame's content pane, a large blank, yellow label.
  • 6. • The Source Of previous example
  • 7. 2. General Purpose Containers
  • 8. 1. Typically used to collect Basic Controls (JButton, JChoiceBox…) 2. Added to layout of top-level containers JPanel JFrame
  • 11. 5. Interactive Displays of Highly Formatted Information