Skip to content

Repository files navigation

Simple StatusBar (JStatusBar Swing component)

Java License

window_screenshot

Description

Simple StatusBar is a Java Swing desktop application demonstrating how to create a custom graphical user interface with a personalized status bar component.

The purpose of this project is to provide a simple example of:

  • creating a desktop application using Java Swing;
  • implementing a custom Swing component (JStatusBar).

The application displays a window containing:

  • a Show button to display the time of a user action;

  • an Exit button to close the application;

  • a custom status bar displaying:

    • an application status message;
    • the current date;
    • visually separated information areas.

Features

  • Java Swing graphical user interface.
  • Automatically centered application window.
  • Custom application icon support.
  • Custom painted status bar component.
  • User event handling.
  • Date and time formatting using DateTimeFormatter.
  • Compatible with modern Java Development Kits.

Requirements

  • Java Development Kit (JDK) 8 or later;
  • OpenJDK 1.8 or later.

Check your Java installation:

java -version

Compiling the source code

From the directory containing the source file:

javac -Xlint:unchecked SimpleStatusBar.java

How to execute the "SimpleStatusBar.class"

Start the application with:

java SimpleStatusBar

Creating the SimpleStatusBar.jar file

jar -cvfm SimpleStatusBar.jar SimpleStatusBar_manifest.txt *.class SimpleStatusBar.png

How to execute the SimpleStatusBar.jar

java -jar SimpleStatusBar.jar

Application Icon

The application attempts to load an icon named:

SimpleStatusBar.png

The resource is loaded using:

SimpleStatusBar.class.getResource("/SimpleStatusBar.png")

The image must therefore be available in the application's classpath.


Technologies Used

Technology Purpose
Java Main programming language
Swing Graphical user interface
AWT Graphics and event handling
java.time Date and time management

License

This project is distributed under a license to be defined.

See the LICENSE file for more information.


Author

Eric Normandin

This project was created as a learning and demonstration example of Java Swing development.

About

Java Swing desktop application demonstrating how to create a custom status bar component (JStatusBar).

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages