views:

192

answers:

3
+3  Q: 

Abstract Java Grid

Hi,

I'm looking for an abstract representation of a grid in Java (grid as in that thing with columns and rows of data). Do such things exist? I want to be able to sort, filter, keep track of rows, set column properties etc. I'll then be realising the grid on the web.

To be clear: I've already decided on the ultimate view technology (client side). The thing I'm looking for will hold all the records and offer them up as the view demands.

A: 

JTable is what you are looking for.

Ichorus
+1  A: 

Have a look to this tutorial from Sun about the tables in java. It gives a good idea on how to implement the model.

Tutorial on tables in Java

Barth
Yes, but only in Java 1.6 did sorting become possible.
bmeck
A: 

You can reuse the table models of the Glazed Lists project (provided that you can hook your web view to a regular TableModel)

ddimitrov
hmmmm - I think you mean Glazed Lists? (http://publicobject.com/glazedlists/)
Kevin Day