• 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 ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

JTable Columns  RSS feed

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, does anyone know how to highlight columns when the column header is clicked?
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

edit: added noFocusBorder to renderer
[ April 25, 2006: Message edited by: Craig Wood ]
 
tan kian
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks ^_^ i'll try it out and get back to u if i have any questions.
 
tan kian
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried to do some stuff by myself, but i ran into some problems. i am using JTables to make an Excel-like spreadsheet. first, i cant highlight rows(when i click on the row header) after i put highlight(table) into the code. 2nd, i wanted it to work like this: highlight the entire row/column when i click on the respective header. however, the entire row/column will be highlighted no matter where i click in the table. can someone help? thanks.

[ April 26, 2006: Message edited by: Mr Hamtaro ]
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
tan kian
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks again Craig ^_^ i'll try your code and ask questions about anything i dont understand.
 
tan kian
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here are the problems i ran into again. can someone help to explain why? anything i should be/should not be doing? thanks!!!

1)even if an entire column/row is been highlighted, choosing another cell does not make the highlighted column/row return to normal



[ April 29, 2006: Message edited by: Mr Hamtaro ]
[ April 29, 2006: Message edited by: Mr Hamtaro ]
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
tan kian
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Craig, u've been a great help =)
 
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Mr Hamtaro":



I'm suprised you haven't been called on your name!
 
tan kian
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lol well maybe because pple who post here are not here to relax? they come here looking for help and codes
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Mr Hamtaro:
lol well maybe because pple who post here are not here to relax? they come here looking for help and codes



I am just referring to this site's naming policy.
 
tan kian
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh sorry i didnt know that. i'll change my name then.
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can still use hamtaro for a profile picture (check out my profile)
[ May 03, 2006: Message edited by: Jeff Albertson ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!