| Author |
Please Help!
|
Peter Phung
Ranch Hand
Joined: Dec 06, 2001
Posts: 138
|
|
I'm trying to extend AbstractTableModel but i am having trouble with one of my methods. teh error message i get when i try to compilethe code is : archivetool/resultsTable.java:580: incompatible types found : int required: java.lang.Object case 12: return row.m_fileSize; Filesize is a field in a database which is created so it has to be an int. Does anyone know what i can do?
|
Pete<br />"Reality is an illusion <br />brought on by a lack of <br />drink, drugs and smut"
|
 |
Michael Ernest
High Plains Drifter
Sheriff
Joined: Oct 25, 2000
Posts: 7292
|
|
|
This belongs in the Swing forum, so I'll move it there.
|
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
|
 |
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
|
|
Hi Peter, Look at the signature of getValueAt(): You have to return an Object. You are trying to return a primitive (ie int) so, if you do this: It should work fine. Hope this helps Michael Morris SCJP2
|
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
|
 |
Peter Phung
Ranch Hand
Joined: Dec 06, 2001
Posts: 138
|
|
I've tried what was suggested but i get this error: archivetool/resultsTable.java:563: missing return statement public Object getValueAt(int nRow, int nCol) { the code is now : If u need to see more code, let me know and i'll post the whole class. Thanks for your help
|
 |
Paul Stevens
Ranch Hand
Joined: May 17, 2001
Posts: 2823
|
|
|
Put return ""; after your switch statement.
|
 |
 |
|
|
subject: Please Help!
|
|
|