table only displays 10 rows
Hi all
I don't know why my table only displays 10rows, even though there are more than that . here is the code
assuming DefaultTableModel dm is already initialized..etc
if (jTableReport != null) {
// the size of data is 20
dm.setDataVector( data, COLUMN_NAMES);
jTableReport.setModel( dm );
}
i have a scroll bar added..the scroll works..but i can only see 10 of the 20 items in data object
[446 byte] By [
happy2005a] at [2007-11-27 8:47:36]

# 2
thank you for your reply.
here is my scrollpane:
private JScrollPane getJScrollPaneReport() {
if (jScrollPaneReport == null) {
jScrollPaneReport = new JScrollPane(getJTableReport(),ScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
jScrollPaneReport.setBounds(new java.awt.Rectangle(15,10,812,180));
jScrollPaneReport.setPreferredSize(new Dimension(592, 180));
}
return jScrollPaneReport;
}
# 3
Still doesn't help.
If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
see http://homepage1.nifty.com/algafield/sscce.html,
that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
Don't forget to use the "Code Formatting Tags",
see http://forum.java.sun.com/help.jspa?sec=formatting,
so the posted code retains its original formatting.