Java applet break line in JTextField

  • Follow


Hi there,I'm designing an applet that it is now almost funcional. It is aclient version of the program that requests a list of items, displayedin strings, on an JTextField on the applet. My question is, when ireceive the text it displays everything on the same line, altought thetextfield is bigger than that. My question is, how can i break line onthe strings receive to produce a better output on the applet? Thanksin advance for any help.RegardsPedro Pinto
0
Reply kubic62 (34) 4/1/2007 5:47:24 PM

Pedro Pinto wrote:> 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.
0
Reply Mark 4/1/2007 6:40:23 PM


Pedro Pinto wrote:..>...how can i break line on>the strings receive to produce a better output on the applet? Mark was correct that JTextArea would allow line breaks,but it really seems this applet would do better with a JList(purpose made for a list of items!).-- Andrew Thompsonhttp://www.athompson.info/andrew/Message posted via JavaKB.comhttp://www.javakb.com/Uwe/Forums.aspx/java-general/200704/1
0
Reply Andrew 4/2/2007 2:54:40 AM

2 Replies
293 Views

(page loaded in 0.007 seconds)

Similiar Articles:











7/22/2012 8:08:50 AM


Reply: