JOptionPane - Java Basics

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,624
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 28, 2011

Prompt a user to enter his or her information using the JOptionPane.showInputDialog() method. Be sure to first import the class:

====
import javax.swing.JOptionPane;
====

Please visit [ http://www.tigertutorials.com ] for more java and website tutorials!

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (TheTigerTutorials)

  • Why do you have all those classes :D ?

    

  • @MultiGamerDA They are other programs, Ignore them, they are unrelated to the current program.

  • @MultiGamerDA Because I'm a busy programmer.

  • Great Tutorials...i wanted to ask that if can we change its title ??

  • @MsHappyNails Thanks for watching Tiger Tutorials, Answer: You can change the title of the message by adding more items to the parameter, it would be done like this: JOptionPane.showInputDialog(nu­ll,"Please enter number","TITLE",JOptionPane.PL­AIN_MESSAGE); . You can change the icon to the left of the message by replacing PLAIN MESSAGE with any of these: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE. Take a look at the Java API, hit Ctrl F and type in "JOptionPane".

  • @TheTigerTutorials thank you so much for answering!!...really helped me...actually i'm making a computer project and i know i'm asking a lot but is it possible that we can have drop down menu or radiobuttons in this dialog box...and thank you for the help once again..!!

  • @MsHappyNails Sorry for slow response time. I've just made a tutorial on my website for using JOptionPane. It can be found here tigertutorials . com/java.php?content=javalesso­ns&id=6

see all

All Comments (12)

Sign In or Sign Up now to post a comment!
  • very nice tutorial, helped me out of a tight spot because I missed a class.

  • @TheTigerTutorials thanks alot:D Very nice vids :D

  • thank you for uploading!!!!!!

    it is so useful!!!!!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more