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]
# 1
I dont' know either, I'm betting the problem lies in the code that you haven't posted.
mpmarronea at 2007-7-12 20:52:47 > top of Java-index,Desktop,Core GUI APIs...
# 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;

}

happy2005a at 2007-7-12 20:52:47 > top of Java-index,Desktop,Core GUI APIs...
# 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.

camickra at 2007-7-12 20:52:47 > top of Java-index,Desktop,Core GUI APIs...
# 4
You don't need to set the bounds and prefered size of the scrollpane. You have set the height of both of those to 180, which to me seems about 10 table rows high. Delete those 2 lines.
mpmarronea at 2007-7-12 20:52:47 > top of Java-index,Desktop,Core GUI APIs...
# 5
thank you pmarrone i removed them from getJTableReport()removeing them from the scroll doesn't work..thank you all
happy2005a at 2007-7-12 20:52:47 > top of Java-index,Desktop,Core GUI APIs...