Skip to content

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

License

Notifications You must be signed in to change notification settings

Pradyuman7/Toast-For-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Toast-For-Java

License: GPL v3

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

Usage

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.

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.