We would like to know how to disable auto resizing to make the table horizontal scrollable.
//from w w w. j a v a 2 s. com import javax.swing.JTable; public class Main { public static void main(String[] argv) { // Create a table with 10 rows and 5 columns JTable table = new JTable(10, 5); table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); } }