Computer Science Canada How to Use Java - JOptionPane Input Dialog |
Author: | dhanyn10 [ Mon May 04, 2015 1:55 am ] | ||||||
Post subject: | How to Use Java - JOptionPane Input Dialog | ||||||
Java Input Dialog is a part of java Option Pane that allows user to input any character into the form. every character given there will become a String data type. Java Input Dialog used for program when needed a respond from user, like's asking for feedback, answer, confirmation, and more. Then here's the simple program that use JinputPane, don?t missed to include import javax.swing.JoptionPane:
Program will works, but it?s doesn?t give you any result to the output because the code above just to display the input dialog. To get value when user giving input any character to your input dialog, add a String data type beside your JoptionPane syntax.
You may use more features from JoptionPane, like?s add a description, title for your OptionPane, and message type, and here?s the example :
that's all the tutorial about java option pane input dialog, for more tutorial, you can visit my blog http://dhanynurdiansyah.blogspot.com/2015/05/how-to-use-joptionpane-showinputdialog.html |