|
|
DataGridView in Java
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?
|
|
0
|
|
|
|
Reply
|
et57 (38)
|
3/28/2011 9:10:49 AM |
|
On Mar 28, 5:10=A0am, Erik <e...@hotmail.com> wrote:
> 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 =A0way 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?
>
<http://lmgtfy.com/?q=3DJava+data+grid+control>
--
Lew
|
|
0
|
|
|
|
Reply
|
Lew
|
3/28/2011 5:26:46 PM
|
|
On 28/03/2011 11:10, Erik allegedly wrote:
> 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?
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
|
|
|
|
Reply
|
Daniele
|
3/28/2011 7:02:52 PM
|
|
|
2 Replies
952 Views
(page loaded in 0.633 seconds)
|
|
|
|
|
|
|
|
|