Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara


Ranch Hand
Posts: 126
  • 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?
Ranch Hand
Posts: 2120
  • 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.
Whose rules are you playing by? This tiny ad doesn't respect those rules:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!