Sunday, 15 February 2026

Tutorial on Swing Components

 Swing library and it's categorization of components and controls


Basically, Swing library provides around 50+ components. These all components are categorized containers, windows and controls etc. based upon their behavior and working style. 

Apart of  these default components, As I wrote in earlier posts, Swing components are customizable and new components can be invented, on need basis. 

Default Swing components and their categorizations are as below:
  • Swing Containers
    • Panel
    • Tabbed Pane
    • Spilt Pane
    • Scroll Pane
    • Tool Bar
    • Internal Frame
    • Desktop Pane
    • Layered Pane
  • Swing Controls
    • Label
    • Button
    • Toggle Button
    • Check Box
    • Radio Button
    • Button Group
    • Combo Box
    • Check Box
    • List
    • Text Field
    • Text Area
    • Scroll Bar
    • Slider etc
  • Swing Windows
    • Dialog
    • Frame
    • Color Chooser
    • File Chooser
    • Option Pane
  • Swing Menus
    • Menu Bar
    • Menu
    • Menu Item
    • Popup Menu
    • Separator
  • Swing Fillers
    • Glue
    • Horizontal Glue
    • Rigid Area
    • Vertical Glue etc.
Example Window with some Controls and containers:

 
Fig 1: Sample Controls from Swing Toolkit



That is all for now. Happy coding!

No comments:

Post a Comment

Tutorial on Swing Components

 Swing library and it's categorization of components and controls Basically, Swing library provides around 50+ components. These all com...