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
Author

Return primitive in getColumnClass?

Mark Dary
Greenhorn

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.

Cheers.

Mark.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

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: http://aspose.com/file-tools
 
subject: Return primitive in getColumnClass?
 
Similar Threads
JTreeTable
Checkbox problem in JTable
JTable numeric validation
Jtable sorting; problem with getValueAt
Null Value in JTable