Skip to content

Tag: jtable

How to resize JScrollPane rowHeader

The code bellow will generate this table: As the image indicates, in this table you can resize the column A, B, … But you cannot resize the column with the lowercase letters a,b,c,e… i.e., the rowHeader of the JScrollPane. Any Ideas how can I do that? Answer As @MadProgrammer has already suggested…

Java JTable getting the data of the selected row

Are there any methods that are used to get the data of the selected row? I just want to simply click a specific row with data on it and click a button that will print the data in the Console. Answer http://docs.oracle.com/javase/7/docs/api/javax/swing/JTable.html You will find these methods in it: Use a mix o…