File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Jtextfield starting point for writing" Watch "Jtextfield starting point for writing" New topic
Author

Jtextfield starting point for writing

kati ameri
Greenhorn

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: 10451
    
    8

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: http://aspose.com/file-tools
 
subject: Jtextfield starting point for writing