Board index » jbuilder » JTable row header

JTable row header


2005-07-01 01:24:03 AM
jbuilder13
Is there a "recommended" way to implement row headers for JTable?
I tried using a JPanel containing JLabels and controlled by a GridBagLayout
manager. But GBL apparently cannot handle grids sizes larger than 512.
TIA
George
 
 

Re:JTable row header

On 6/30/2005 at 1:24:03 PM, George wrote:
Quote
Is there a "recommended" way to implement row headers for JTable?

I tried using a JPanel containing JLabels and controlled by a
GridBagLayout manager. But GBL apparently cannot handle grids sizes
larger than 512.
If that was the only issue, you could use a different layout, such as a
BoxLayout or a GridLayout. But creating a separate JLabel component for
each row will have scalability problems. I would try using another JTable
with a single column for the row header.
--
Regards,
John McGrath
 

Re:JTable row header

Of the things that I tried, I think I like the look of the JLabels in
JPanel. Would getting the JLabel from a CellRenderer object take care of
the scaleability issue?
TIA
George
"John McGrath" < XXXX@XXXXX.COM >wrote in message
Quote
On 6/30/2005 at 1:24:03 PM, George wrote:

>Is there a "recommended" way to implement row headers for JTable?
>
>I tried using a JPanel containing JLabels and controlled by a
>GridBagLayout manager. But GBL apparently cannot handle grids sizes
>larger than 512.

If that was the only issue, you could use a different layout, such as a
BoxLayout or a GridLayout. But creating a separate JLabel component for
each row will have scalability problems. I would try using another JTable
with a single column for the row header.

--
Regards,

John McGrath
 

{smallsort}