return addMetric( null, label, type );
}
public JXTable addTable( TableModel model )
{
JXTable table = new JXTable( model );
table.setBorder( null );
table.setShowGrid( false );
table.setAutoResizeMode( JTable.AUTO_RESIZE_OFF );
table.setSortable( false );
table.getColumn( 0 ).setWidth( 195 );
table.getColumn( 0 ).setMinWidth( 195 );
InternalHeaderRenderer internalHeaderRenderer = new InternalHeaderRenderer( table.getTableHeader()
.getBackground() );
InternalCellRenderer internalCellRenderer = new InternalCellRenderer();
for( int c = 0; c < table.getColumnCount(); c++ )
{
table.getColumn( c ).setHeaderRenderer( internalHeaderRenderer );
table.getColumn( c ).setCellRenderer( internalCellRenderer );
}
table.getTableHeader().setReorderingAllowed( false );
table.getTableHeader().setBackground( Color.WHITE );
JScrollPane scrollPane = new JScrollPane( table );
scrollPane.setBorder( BorderFactory.createEmptyBorder( 0, 14, 0, 14 ) );
form.addComponent( scrollPane );
table.setPreferredScrollableViewportSize( new Dimension( 100, 250 ) );
scrollPane.setBackground( Color.WHITE );
scrollPane.getViewport().setBackground( Color.WHITE );
scrollPane.setOpaque( true );
table.setBackground( Color.WHITE );
table.setOpaque( true );
return table;
}