Skip to content

Commit 6de84ed

Browse files
authored
Update README.md
1 parent 683d81c commit 6de84ed

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
11
# Toast-For-Java
22
A java class that can be used for Toast like popup messages in simple Java applications
3+
4+
## Usage
5+
6+
```java
7+
String toastMsg = "This is the toast message";
8+
int toastMsgTime = 3500; //3.5 seconds
9+
int fadeInTime = 500; //0.5 seconds
10+
int fadeOutTime= 500; //0.5 seconds
11+
Toast.makeText(primarystage, toastMsg, toastMsgTime, fadeInTime, fadeOutTime);
12+
```
13+
14+
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.
15+
[Read more about this here](docs.oracle.com/javase/8/javafx/api/javafx/stage/Stage.html).

0 commit comments

Comments
 (0)