All rows not visible in the table.
Hi,
I have created a table, It is displaying finely. But when I add many rows to the table, only 10 rows are visible. I have used Default table model, I am inserting rows into the table at a later stage. I tried many ways, If anybody knows please help me out of it.
model =new DefaultTableModel(columnNames,0)
{
public Class getColumnClass(int columnIndex)
{
Object o = getValueAt(0, columnIndex);
if (o ==null)
{
return Object.class;
}
else
{
return o.getClass();
}
}
};
table =new JTable(model){
public Dimension getPreferredSize(){
returnnew Dimension(300, 300);
}
public Dimension getMinimumSize(){
returnnew Dimension(300, 0);
}
public Dimension getMaximumSize(){
returnnew Dimension(300, 300);
}
};
table.setRowHeight(30);
table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
with Regards,
Gangotri

