How can i get the displayed cell value in a JTable (not full TableModel value)?

Normally, i get the value of a table cell in JTable using

table.getModel().getValueAt(rowIndex, columnIndex)

However, now i have a given input JTable (which i don't control or create) and need to get the displayed cell value as a String. If the value is a Double, it can have value with more digits than are displayed by the JTable.


The JTable displays 0.37 (two digits) - but getValueAt returns 0.37234421

What i'm looking for is either get the displayed value as a String, or the # of digits displayed (so i can...

Read More »

By: StackOverFlow - 5 days ago

Related Posts