+ 1
Can we take input from a Alert message in Java??
Working on a code which do not use An IDE need to throw a dialogue in between and ask for input can we have such thing
3 Réponses
+ 1
On JavaScript:
var name = prompt("Enter your name...", "John Doe");
// And some logic here
if (name == "GAURAV") {
alert("Hello " + name + "!");
} else {
alert("Sorry! I don't know who is " + name + ".");
}
For Java you should use the JavaFX library.
Here are some examples (scroll to "Text Input Dialogs"):
http://code.makery.ch/blog/javafx-dialogs-official/
+ 1
No, but you can use 'prompt', if you meant JavaScript.
+ 1
how??