Coder Social home page Coder Social logo

hasnatrasool163 / hmeter Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 315 KB

HMeter: Customizable progress meter widget using Java Swing and 2D classes.It is highly customizable and could be used to indicate any progress in applications.

License: MIT License

Java 100.00%
java java8 javaswing javaswing-javaawt-oops-mysql javaswingsapp swing swing-component swing-components swing-gui gui-meter hmeter

hmeter's Introduction

HMeter - Customizable Horizontal Progress Meter Widget

HMeter is a highly customizable Java Swing widget designed to display horizontal progress visually. It provides developers with a simple yet versatile tool to showcase progress in graphical form. With HMeter, you can easily integrate progress meters into your Java Swing applications, allowing for a more intuitive user experience.

Features

  • Customizable Progress: Set the progress value dynamically from 0 to 100.
  • Color Customization: Customize the colors of the progress arc, text, background, and boundary.
  • Text Display: Display custom text within the progress meter.
  • Hollow or Filled Arc: Choose between a hollow or filled arc for the progress indicator.
  • Animation: Optionally animate the progress to provide a more engaging user experience.
  • Mouse Interaction: Enable interactive control of the progress through mouse dragging.
  • Responsive Design: Ensures a minimum height for the meter to maintain proper visibility.
  • Set Background: Ensure a consistent design and personalization.

Getting Started

To integrate HMeter into your Java Swing application, follow these steps:

  1. Download the HMeter.jar file.
  2. Include HMeter.jar in your project folder libraries,import HASNAT.HMeter.
  3. Instantiate an HMeter object and add it to your Swing component hierarchy.
  4. Customize the meter's appearance and behavior using the provided setter methods.
  5. Monitor and update the progress as needed in your application logic.

ScreenShot

Screenshot (1135)

Screenshot (1140)

Usage

Here's a simple example demonstrating how to use HMeter:

import javax.swing.; import java.awt.; // import HASNAT.HMeter

public class MainFrame extends JFrame { public MainFrame() { super("HMeter Demo");

    // Create an HMeter with initial progress and text
    HMeter hMeter = new HMeter(50, "Processing...");

    // Customize HMeter appearance
    hMeter.setProgressColor(Color.BLUE);
    hMeter.setTextColor(Color.BLACK);
    hMeter.setBackgroundColor(Color.WHITE);

    // Add HMeter to the frame
    getContentPane().add(hMeter);

    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setSize(300, 300);
    setLocationRelativeTo(null);
    setVisible(true);
}

public static void main(String[] args) {
    SwingUtilities.invokeLater(() -> new MainFrame());
}

}

Contributions

Contributions to HMeter are welcome! If you find any issues or have suggestions for improvements, please feel free to submit a pull request or open an issue on GitHub.

License

HMeter is licensed under the MIT License. See the LICENSE file for details.


Enjoy using HMeter in your Java Swing projects and let us know how it enhances your user interfaces!

hmeter's People

Contributors

hasnatrasool163 avatar

Stargazers

Leonardo Vergani avatar Grasoolmeet1 avatar Fizzatwitter avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.