|
|
Java applet break line in JTextField
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: Applet uses JavaComm Exception "...name can't be null" - comp.lang ...As a standalone applet it works fine. It breaks when I use it as an ... CommPort.java:123) <---- *** Last Line ... and Mutual Authentication - comp.lang.java ... Applet ... Textarea max rows and max characters per row - comp.lang ...... user types continuously, I need to then programatically create line breaks ... Character count and character check in JTextField - comp.lang.java ... Textarea max rows and ... custom class in java.* package - is it possible? - comp.lang.java ...Shortest way to read all lines (one by one) from a ... My Caret Class that extends ... just in case of JTextField ... also that the Applet class can be found in the java.applet ... Writing a outlook msg file using java - comp.lang.java.programmer ...After checking on Java forums, i found that the MSG ... See http://mindprod.com/jgloss/applet ... Can't get line breaks into email message body - comp.lang ... Problems with JTable using fixed rows - comp.lang.java.gui ...... more validation roots, one can break this ... However, when using the above line, the sorting method provided by Java 1.6 ... In contrast, JTextField's isValidateRoot ... Custom tooltip renderer in JTable - comp.lang.java.guiI am trying to get a multi-line tooltip on ... that it requires me to calculate my own line breaks ... tooltip renderer in JTable - comp.lang.java.gui how to put JTextfield ... Using JComboBoxes in a JTable - comp.lang.java.gui... have 4 JComboBoxes, here is the code: import java.awt ... you want but it would be a hack and would probably break ... comp.lang.java.gui I am trying to get a multi-line ... "Platform default encoding" - comp.lang.java.helpJust please don't multi-post, it really breaks up the ... source code available at http://mindprod.com/applet ... UTF-8 and specify UTF-8 on the javac command line. Java ... why my applet can't display components like JButton or JTextField ...Java: 5: 09-27-2007 07:33 PM: Java applet break line in JTextField: Pedro Pinto: Java: 2: 04-02-2007 02:54 AM: Can I use a swing Component (e.g. JTextField) in a Java Applet Line break (Beginning Java forum at JavaRanch)Actually, although \n will usually produce a line-break, it is not correct portable Java. The reason is that \n is a specific single character, not the platform-dependent ... 7/22/2012 8:08:50 AM
|
|
|
|
|
|
|
|
|