Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pradyuman7/toast-for-java

A Java class that can be used for :bread: like popup messages in simple Java applications.
https://github.com/pradyuman7/toast-for-java

java java-application java-gui-application java-library javafx-application javafx-library library popup-message toast

Last synced: 2 months ago
JSON representation

A Java class that can be used for :bread: like popup messages in simple Java applications.

Awesome Lists containing this project

README

        

# Toast-For-Java

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)




A Java class that can be used for :bread: like popup messages in simple Java applications.

## Usage

```java
String toastMsg = "This is the toast message";
int toastMsgTime = 3500; //3.5 seconds
int fadeInTime = 500; //0.5 seconds
int fadeOutTime= 500; //0.5 seconds
Toast.makeText(primarystage, toastMsg, toastMsgTime, fadeInTime, fadeOutTime);
```

Also, here `PrimaryStage` is the stage where the toast message will be attached. If you have only one stage then primaryStage is the parameter of the method start of your application.
[Read more about this here](docs.oracle.com/javase/8/javafx/api/javafx/stage/Stage.html).

## How to import in Project

Simply go to release section, download the Java class or just copy paste the source code from here in your Javafx application.