• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help about Row Headers in Swing

 
Ugly Redneck
Posts: 1006
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody!
I need to develop a swing applet which has a row header that behaves and functions similar to the row headers found in MS Access. That is, on clicking the row header against any of the rows, the entire row should be highlighted. This is urgent and I'd be pleased if someone could reply soon.. thanks..
Thanks in advance
SR
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JTable.setColumnSelectionAllowed(boolean) toggles exactly what it says.
Then it's simply a matter of adding a mouse listener to the table header which figures out which column header was clicked and selecting the appropriate column.
The TableSorter example from the Java tutorial gives an example of listening to a table header.
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This link deals with some of the rowheader stuff. Hope this helps !!!
http://www.esus.com/javaindex/j2se/jdk1.2/javaxswing/editableatomiccontrols/jtable/jtablerowheaders.html
Thanks
Meghna
 
reply
    Bookmark Topic Watch Topic
  • New Topic