This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Can we set an image in a cell of a jtable. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Can we set an image in a cell of a jtable." Watch "Can we set an image in a cell of a jtable." New topic
Author

Can we set an image in a cell of a jtable.

phooton misra
Ranch Hand

Joined: Jul 31, 2012
Posts: 52

[color=red][/color][size=24][/size][size=18][/size][size=24]Can we set an image in a cell of a jtable.[/size]
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 5041
    
  10

Yes. Add Icons to the model and return Icon.class from getColumnClass(...)


luck, db
There are no new questions, but there may be new answers.
phooton misra
Ranch Hand

Joined: Jul 31, 2012
Posts: 52

hi darryl

i tried to change the image as utold ,its working fine ,but at the same time its not changing color ,but if i ll not change the image than it is changing xolor ,kindly suggest me what should i do?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 5041
    
  10

phooton misra wrote:hi darryl

i tried to change the image as utold ,its working fine

Good to know.

phooton misra wrote:but at the same time its not changing color ,but if i ll not change the image than it is changing xolor ,kindly suggest me what should i do?

That probably makes sense to you, since you know what you're trying to do, but even after reading it 4 or 5 times I haven't a clue what it's supposed to convey.

To get better help sooner, post a SSCCE (Short, Self Contained, Correct (Compilable), Example) that demonstrates the problem. Not all your code; just a short-as-possible program that we can compile and execute to see where your problem lies.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can we set an image in a cell of a jtable.
 
It's not a secret anymore!