• Post Reply Bookmark Topic Watch Topic
  • New Topic

Highlight text of cell in JTable  RSS feed

 
Sam Zheng
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JTable whose cell elements are Double. The default behavior of the table is that when you click the cell and start type, the new text starts from the end of previous text. For example, if one cell has a value of "0.001", when I click this cell and type "2", the cell becomes "0.0012".
What I want is that when I click a new cell and type a number, the new value just over-writes the old value, i.e., "2" overwrites "0.001" so that new value on the cell becomes "2".
Would anyone give a suggestion?
Thanks!
Sam
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!