0% found this document useful (0 votes)
10 views4 pages

Java Swing

The document provides an organized overview of Java Swing GUI components, categorizing them into Top Level Containers, Containers, Basic UI Components, Selection Components, Menu Components, Data Display Components, Dialog/Utility Components, Layout Managers, Borders, and Event Handling Interfaces. It highlights essential components for building professional applications and suggests a step-by-step learning order for mastering Swing. Each category includes specific components and their uses, making it a comprehensive reference for developers.

Uploaded by

Aditya More
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views4 pages

Java Swing

The document provides an organized overview of Java Swing GUI components, categorizing them into Top Level Containers, Containers, Basic UI Components, Selection Components, Menu Components, Data Display Components, Dialog/Utility Components, Layout Managers, Borders, and Event Handling Interfaces. It highlights essential components for building professional applications and suggests a step-by-step learning order for mastering Swing. Each category includes specific components and their uses, making it a comprehensive reference for developers.

Uploaded by

Aditya More
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

In Java Swing (part of Java), there are many GUI components.

I’ll organize them so you can easily


know what components exist and what they are used for.

1️⃣ Top Level Containers (Main Windows)


These create the main window or dialog.

Component Use
JFrame Main application window
JDialog Popup dialog window
JWindow Simple borderless window
JApplet Applet window (obsolete now)

2️⃣ Containers (Used to hold components)


These organize GUI elements.

Component Use
JPanel General container
JScrollPane Adds scroll bars
JSplitPane Split screen panels
JTabbedPane Tabbed interface
JLayeredPane Components in layers
JDesktopPane MDI applications
JInternalFrame Window inside window

3️⃣ Basic UI Components


Most commonly used elements.

Component Use
JLabel Display text
JButton Clickable button
JToggleButton Toggle button
Component Use
JCheckBox Check box
JRadioButton Radio button
JTextField Single line text input
JPasswordField Password input
JTextArea Multi-line text
JTextPane Rich text
JEditorPane HTML text display

4️⃣ Selection Components


Used to choose options.

Component Use
JComboBox Dropdown list
JList List of items
JSpinner Numeric spinner
JSlider Slider control

5️⃣ Menu Components


For application menus.

Component Use
JMenuBar Menu bar
JMenu Menu
JMenuItem Menu option
JCheckBoxMenuItem Checkbox menu
JRadioButtonMenuItem Radio menu
JPopupMenu Right-click menu

6️⃣ Data Display Components


Show structured data.
Component Use
JTable Table/grid
JTree Tree structure
JProgressBar Progress indicator

7️⃣ Dialog / Utility Components


Special windows.

Component Use
JOptionPane Message dialog
JColorChooser Color picker
JFileChooser File open/save dialog

8️⃣ Layout Managers (Important)


Control how components are arranged.

Layout Use
FlowLayout Left to right
BorderLayout North, South, East, West, Center
GridLayout Rows and columns
BoxLayout Vertical/horizontal
GridBagLayout Advanced flexible layout
GroupLayout Used by GUI builders

9️⃣ Borders
Add borders to components.

Border Use
LineBorder Line border
TitledBorder Border with title
EtchedBorder 3D effect
Border Use
BevelBorder Raised/Lowered border

🔟 Event Handling Interfaces


Used for interaction.

Listener Event
ActionListener Button click
MouseListener Mouse events
KeyListener Keyboard input
ItemListener Checkbox/radio events
WindowListener Window events

💡 Important Components Used in Real Apps


If you want to build professional Swing applications, focus on:

JFrame
JPanel
JButton
JLabel
JTextField
JTextArea
JTable
JMenuBar
JScrollPane
JOptionPane
JComboBox
JCheckBox
JRadioButton
JTabbedPane
JFileChooser

✅ Since you are already making Swing tutorials in separate files, I can also give you a perfect
order to learn all Swing components step-by-step (about 30 tutorials) so you master Swing
completely.

You might also like