File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help about Row Headers in Swing

 
Paul McKenna
Ugly Redneck
Ranch Hand
Posts: 1006
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Nathanael Ulrick
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Meghna ks
Ranch Hand
Posts: 122
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic