jTable: Object to a double?
Hello all,
I'm working on a small GUI application and I've stumbled upon something I can't quite wrap my head around.
I'm retrieving a value from a cell, or many cells actually, in a jTable with the following: Code:
Object G1P1a = PeakBubTable.getValueAt(0,0);
The jTable is setup so that the data entered is a double.
However, when I retrieve the cell data it is an Object. I need to pass this retrieved cell data (i.e. 7.5, 2.3, etc) to a class that I've written.
I'm getting an error stating that the method in my class cannot be applied to given types. I'm assuming this is because it is being retrieved as an Object, but needs to be a double in order to be utilized in my mathematical equations in my class.
I couldn't find an example similar to what I'm doing. Most examples only show how to populate a table, or simple retrieve cell data and display it, but not actually do anything useful with it.
Any help is greatly appreciated.
Thanks.