• Post Reply Bookmark Topic Watch Topic
  • New Topic

Line number problem.  RSS feed

 
arvind s
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
How can i add line numbers to a JTextField ? I mean line numbers to the left of my JTextField. When i press Enter , a new line number should appear.
Thanks.
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am confused about your question. JTextField only supports one line, what would a line number mean?
By the way, when enter is hit inside a JTextField it sends an action event - it does not add a linefeed/carriage return ...
Manfred.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!