The moose likes Swing / AWT / SWT and the fly likes Jtextfield starting point for writing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Jtextfield starting point for writing" Watch "Jtextfield starting point for writing" New topic

Jtextfield starting point for writing

kati ameri

Joined: Mar 04, 2009
Posts: 4
When I try to write in the textfield it starts from the centeral line, I want it to start from the top line, how can I do it? another thing is that by pressing enter it doesn't go to the next line, how can I solve that one?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10827

1) Can you please elaborate on "Central line"? How are you initializing your text field? Have you set any empty string to it while initializing?
2) TextField is single line (row) only. If you want a field with multiple lines (rows), you need to use JTextArea

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: Jtextfield starting point for writing
It's not a secret anymore!