• Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom JDialog - getting the data  RSS feed

 
Jacob Coddaire
Ranch Hand
Posts: 36
Chrome Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey everyone,

I feel like this is a really simple answer, but I just can't remember how to do it.



This basically allows the user to enter anything they want. My question is, how do I save the inputted data into a variable? Preferably a string, but I can always parse an object if need be.

 
Cory Hartford
Ranch Hand
Posts: 85
Eclipse IDE Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. The JOptionPane.showInputDialogue Object is a String; so I believe that you have to set it equal to a String variable to capture the input. Scroll down to method summaries and take a look.
webpage
 
Jacob Coddaire
Ranch Hand
Posts: 36
Chrome Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, you were right. I also took a look at the webpage below.

http://www.cstutoringcenter.com/tutorials/java/java6.php

It helped clear everything up. Thanks anyways.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!