question on JscrollPane
Hi
I have a table which i want to put in a jscrollpane, below is my code snippet. By this way nothing shows up in the scroll pane. If I just add the table to the tempPanel, like
tempPanel.add(colorTable, BorderLayout.SOUTH);
values are there. Could anyone please let me know why this could happen. Any help is greatly appreciated.
colorTable = new JTable(screenColorModel);
colorTable.setShowGrid(false);
colorTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
colorTable.setBackground(getBackground());
colorTable.setDefaultRenderer(Object[].class, new ScreenColorRenderer());
colorTable.setRowSelectionAllowed(false);
colorTable.setColumnSelectionAllowed(false);
colorTable.setCellSelectionEnabled(false);
colorTable.getColumnModel().getColumn(0).setMaxWidth(30);
colorScroll = new JScrollPane(colorTable);
tempPanel = new JPanel(new BorderLayout());
tempPanel.add(colorScroll, BorderLayout.SOUTH);
Thanks

