This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Return primitive in getColumnClass? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Return primitive in getColumnClass?" Watch "Return primitive in getColumnClass?" New topic

Return primitive in getColumnClass?

Mark Dary

Joined: Jan 16, 2009
Posts: 29
Hi all

Is is possible to return a primitive in getColumnClass.

I was returning int.class but I kept getting errors, so I changed it to an Integer and it seems OK.

I was just curious if it was actually allowed to return a primitive.


Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990

Not really.
The expected return type is a class object and as you know primitives are well...primitives !

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: Return primitive in getColumnClass?
Similar Threads
Checkbox problem in JTable
JTable numeric validation
Jtable sorting; problem with getValueAt
Null Value in JTable