I have 1 jframe containing 1 panel. This panel shows data using JTable. I want to put button at the bottom of the panel to print that data in PDF. Can I reduce the size of the JTable? Currently it takes the size as that of the panel.
Can I reduce the size of the JTable? Currently it takes the size as that of the panel.
no idea about numbers of records. but
1) myJTable.setPreferredScrollableViewportSize(myJTable.getPreferredSize()), for a few row, this should to reduce the size of JScrollPane
2) have to get height from row (Assume that every rows have got the same size) and multiply with desired number of row, this Dimmension put to the code line in 1st. point, instead of myJTable.getPreferredSize()