1.0.4 • Published 3 years ago

jsoptionpane v1.0.4

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
3 years ago

JSOptionPane

Just JOptionPane but in JavaScript. Just for fun (It doesn't finish yet)

Table of Contents

showMessageDialog

parameter : frame, message Example:

const Dialog = require("JSOptionFrame");
const Window = new Dialog();

Window.showMessageDialog( null, "I love Chicken!" )

Output: image.png

showConfirmDialog

parameter : frame, message Example:

const Dialog = require("JSOptionFrame");
const Window = new Dialog();

Window.showConfirmDialog( null, "Do you love chicken?" ) ;

Output: image.png

Return: 0 - User selected "Yes" 1 - User selected "No" 2 - User selected "Cancel"

showInputDialog

parameter : frame, message, initialSelectionValue Example:

const Dialog = require("JSOptionFrame");
const Window = new Dialog();

Window.showInputmDialog( null, "Who is your Chick?", "Chicken" );

Output: image.png

Return: UserInput

exit

Exit the program Example:

const Dialog = require("JSOptionPane"); 
const Window = new Dialog(); 

Window.showMessageDialog( null, "I like pizza" );
Window.exit();

Get user input

Example:

const Dialog = require("JSOptionPane"); 
const Window = new Dialog(); 

var loveChicken = Window.showConfirmDialog( null, "Do you love chicken?" );

switch(loveChicken) {
    case 0:
        Window.showMessageDialog( null, "Yeah! I love it too!" ); 
        return Window.exit();
    case 1:
        Window.showMessageDialog( null, "Why?? Chicken is the best thing" );
        return Window.exit();
    case 2:
        return Window.exit(); 
}
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago