0

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....

Votes + Comments
GOOD SENTENCE STRUCTURE
BAD SENTENCE STRUCTURE
2
Contributors
4
Replies
5
Views
12 Years
Discussion Span
Last Post by server_crash
1

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.

Votes + Comments
That's an answer!
0

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.

1

JDialog. It will be just like creating a JFrame, but it's a dialog. A bit more complex, but it will do the job.

Votes + Comments
haha.. Thanks for helping me out when I was a complete idiot :)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.