wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes multiline textfield Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "multiline textfield" Watch "multiline textfield" New topic
Author

multiline textfield

Annalisa Annalisa
Greenhorn

Joined: Mar 07, 2005
Posts: 6
How can I specify a text field (JTExtField) as multiline? I mean that the user input doesn't expand horizontally but it automatically goes down a line?

Thank you
Annalisa
James Carman
Ranch Hand

Joined: Feb 20, 2001
Posts: 580
You can't! Use JTextArea instead.


James Carman, President<br />Carman Consulting, Inc.
Ray Stojonic
Ranch Hand

Joined: Aug 08, 2003
Posts: 326
The first line of the JTextField documentation reads: "JTextField is a lightweight component that allows the editing of a single line of text."

What you want is a JTextArea
Annalisa Annalisa
Greenhorn

Joined: Mar 07, 2005
Posts: 6
ok..sorry! :roll:
thank you
 
GeeCON Prague 2014
 
subject: multiline textfield