Skip to content

Mavros-Lykos/java-swing-layouts-showcase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’‘ Java Swing Layouts Showcase

Release GitHub stars License: MIT Java 11

An interactive, educational demo that showcases the behavior and usage of major Java Swing layout managers. It is designed for students, educators, and developers who want a concise, hands-on reference for building Swing UIs.

πŸ“¦ BorderLayout, FlowLayout, GridLayout, BoxLayout, CardLayout, and GridBagLayout.

Built with Java 11 and FlatLaf for a modern UI.

Application Demo


πŸ“ Project Structure

JavaSwingLayouts/
β”œβ”€β”€ exe/                     # Windows executable (.exe) generated via Launch4j
β”‚   └── JavaSwingLayouts.exe
β”œβ”€β”€ lib/                     # External libraries (FlatLaf)
β”‚   └── flatlaf-3.6.jar
β”œβ”€β”€ nbproject/               # NetBeans project metadata
β”œβ”€β”€ src/
β”‚   └── LayoutsShowcase/     # Java source package
β”‚       └── LayoutShowcase.java
β”œβ”€β”€ dist/                    # Generated JAR file (JavaSwingLayouts.jar)
β”œβ”€β”€ build.xml                # Ant build script
β”œβ”€β”€ manifest.mf              # Manifest file
β”œβ”€β”€ LICENSE                  # MIT License
β”œβ”€β”€ README.md                # This file
└── ApplicationDemo.png      # Screenshot of the application

πŸš€ How to Run

βœ… Option 1 – Run Executable (Windows Only)

Navigate to the exe/ folder and double-click:

βœ… Option 2 – Run via NetBeans

  1. Open the project in NetBeans.
  2. Make sure JDK 11 is configured.
  3. Run the LayoutShowcase.java file.

β˜• Requires: Java Development Kit (JDK) 11+


Table of contents


Overview

This small demo application includes examples for the following layout managers:

  • BorderLayout
  • FlowLayout
  • GridLayout
  • BoxLayout
  • CardLayout (interactive view switching)
  • GridBagLayout

Each demo is implemented in src/LayoutsShowcase/LayoutShowcase.java and demonstrates typical use cases and resizing behavior.

Features

  • Clear, interactive examples of major Swing layouts.
  • Modern appearance using FlatLaf (optional dependency in lib/).
  • Resizable UI to demonstrate layout responsiveness.
  • Simple entry points for experimentation and extension.

Requirements

  • Java Development Kit (JDK) 11 or later
  • Optional: NetBeans IDE (project metadata provided) or another Java IDE

πŸ™‹ Contributing

Contributions and feedback are welcome. Please follow these steps:

  1. Fork the repository.
  2. Create a feature branch (feature/my-change).
  3. Add tests or demonstrate the change in the UI where applicable.
  4. Open a pull request with a clear description of the change.

For issues or feature requests, use the GitHub issues page: https://github.com/Mavros-Lykos/java-swing-layouts-showcase/issues


πŸ“œ License

This project is released under the MIT License. See LICENSE for details.


** πŸ‘€ Author**: Mavros-Lykos β€” https://github.com/Mavros-Lykos

About

πŸ’‘ Java Swing Layouts Showcase Interactive demo application showcasing all major Java Swing layout managers β€” BorderLayout, FlowLayout, GridLayout, BoxLayout, CardLayout, and GridBagLayout. Built with Java 11 and FlatLaf for a modern UI look. Ideal for students, educators, and developers learning Java GUI development.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages