Java applet break line in JTextField

P

Pedro Pinto

Hi there,

I'm designing an applet that it is now almost funcional. It is a
client version of the program that requests a list of items, displayed
in strings, on an JTextField on the applet. My question is, when i
receive the text it displays everything on the same line, altought the
textfield is bigger than that. My question is, how can i break line on
the strings receive to produce a better output on the applet? Thanks
in advance for any help.

Regards

Pedro Pinto
 
M

Mark Space

Pedro said:
Hi there,

I'm designing an applet that it is now almost funcional. It is a
client version of the program that requests a list of items, displayed
in strings, on an JTextField on the applet. My question is, when i
receive the text it displays everything on the same line, altought the
textfield is bigger than that. My question is, how can i break line on
the strings receive to produce a better output on the applet? Thanks
in advance for any help.

I think the answer is pretty much "no." JTextField is designed to be a
single line of text entry and changing that would involve some horrible
hacks. Look at JTextArea if you need multi-line input.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top