RSS Forums RSS
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 1283 | Replies: 4 | Solved
Reply
Join Date: Jul 2005
Location: Texas
Posts: 4,834
Reputation: joshSCH is on a distinguished road 
Rep Power: 0
Solved Threads: 9
joshSCH's Avatar
joshSCH joshSCH is offline Offline
Banned

textFields help

  #1  
Jul 21st, 2005
Im pretty new to java and I have created a couple simple programs... and I was just wandering how exactly to use textFields and textAreas. I have created a textfield before, but I need a simple textField that works like the windows prompt. I just want a textField that will prompt the user for certain data and then return data. I already have the program, I just need to find out how to make it execute in a textField.
Thanks for any help....
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2004
Location: H4x0rville
Posts: 2,105
Reputation: server_crash is on a distinguished road 
Rep Power: 9
Solved Threads: 18
server_crash's Avatar
server_crash server_crash is offline Offline
Postaholic

Re: textFields help

  #2  
Jul 21st, 2005
I don't think you want JTextFields. Look up JOptionPanes. They give you many options to get input from the user via an input box.
Reply With Quote  
Join Date: Jul 2005
Location: Texas
Posts: 4,834
Reputation: joshSCH is on a distinguished road 
Rep Power: 0
Solved Threads: 9
joshSCH's Avatar
joshSCH joshSCH is offline Offline
Banned

Re: textFields help

  #3  
Jul 21st, 2005
oh ok, no wonder why I....

thanks
Reply With Quote  
Join Date: Jul 2005
Location: Texas
Posts: 4,834
Reputation: joshSCH is on a distinguished road 
Rep Power: 0
Solved Threads: 9
joshSCH's Avatar
joshSCH joshSCH is offline Offline
Banned

Re: textFields help

  #4  
Jul 22nd, 2005
is there anything else that would be like the command prompt, but just a text box instead? I need something that takes more than 3 or 4 strings from the user, and the JOptionPane doesnt seem to work well with it.
Reply With Quote  
Join Date: Jun 2004
Location: H4x0rville
Posts: 2,105
Reputation: server_crash is on a distinguished road 
Rep Power: 9
Solved Threads: 18
server_crash's Avatar
server_crash server_crash is offline Offline
Postaholic

Re: textFields help

  #5  
Jul 22nd, 2005
JDialog. It will be just like creating a JFrame, but it's a dialog. A bit more complex, but it will do the job.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:40 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC