Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jtextfield starting point for writing

 
kati ameri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11070
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic