File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable

 
ben riches
Ranch Hand
Posts: 126
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
On the last cell inside my JTable I have to Tab away from that cell in order for that cells data to be counted. Is there a way where I can get all the data from each cell without having to tab away from the last cell?
Also when I click into a cell first of all it always is the color yellow untill I start typing in that cell. I have had a look at all the diffrent color methods ie background, forground etc but still cannot find the right one. so could someone put me right on this please?
Thanks
Ben
 
Jose Botella
Ranch Hand
Posts: 2120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not know how to answer the first part of your post.
It seems to me that in the second part, you are complaining about the color of the cell when it has the focus. Write a TableCellRenderer implementation that sets the the color of the cell when the argument hasFocus to the method TableCellrenderer.getTableCellRendererComponent(...) is true.
There are excellent examples of writing a TableCellRenderer around this forum at the moment. Or visit How to use Tables in the Java Tutorial.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic