A vibrant showcase of six layout managers in Java Swing, elegantly arranged within a single frame for visual comparison and learning. The highlight is that all the buttons are clickable, and each layout has its own impressive functionality.
This project presents a hands-on GUI that explores the following layout managers:
- ๐ BorderLayout
- ๐งฉ GridLayout
- ๐ FlowLayout
- ๐งฑ GridBagLayout
- ๐ BoxLayout
- ๐ด CardLayout (with interactive switching!)
Each layout is color-coded, labeled, and displayed in a dedicated panelโallowing users to intuitively experience how components behave in different layout settings.
- A single window showcasing all six layout managers
- Interactive CardLayout with button navigation
- Visually distinct and color-coded panels
- Manual positioning to appreciate visual boundaries
- Clean, commented Java code using
JFrame
andJPanel
- Java Swing (JDK 8+)
- NetBeans / IntelliJ compatible
- AWT + Swing UI toolkit
# Compile
javac com/mycompany/laytypes/LAYTYPES.java
# Run
java com.mycompany.laytypes.LAYTYPES