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

Rashakil Fol commented: BAD SENTENCE STRUCTURE -2
christina>you commented: GOOD SENTENCE STRUCTURE +19

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.

commented: That's an answer! +8

oh ok, no wonder why I....

thanks

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.

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

commented: haha.. Thanks for helping me out when I was a complete idiot :) +7
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.