Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DataGridView in Java

602 views
Skip to first unread message

Erik

unread,
Mar 28, 2011, 5:10:49 AM3/28/11
to
I need a Java equivalent to the .NET DataGridView: a way to display
data from a database file, and I need to be able to modify/extend the
source, in that I want to "blind" certain cells in the table: These
cells cannot be edited, shown or contain any data and must be hopped
over using the arrow keys. So these cells are in fact inaccessible in
any way possible. I'm not talking rows or columns, but CELLS! JTable
does not make this possible, also extension of JTable does not do it
for me. ANy suggestions as to existing source code?

Lew

unread,
Mar 28, 2011, 1:26:46 PM3/28/11
to

Daniele Futtorovic

unread,
Mar 28, 2011, 3:02:52 PM3/28/11
to

I'm pretty certain I remember you could do that with a JTable (don't see
anything else in the Sun API that'd match your needs).

Hiding would be done with a custom TableCellRenderer, along with the
TableModel specifying they aren't editable.

Focus traversal would probably be done with a proper
FocusTraversalPolicy -- although that might be tricky. Perhaps it would
work simply properly to flag the Component returned in the
TableCellRenderer.

--
DF.
An escaped convict once said to me:
"Alcatraz is the place to be"

0 new messages