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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top