Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 53
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[color=red][/color][size=24][/size][size=18][/size][size=24]Can we set an image in a cell of a jtable.[/size]
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. Add Icons to the model and return Icon.class from getColumnClass(...)
 
phooton misra
Ranch Hand
Posts: 53
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Don't listen to Steve. Just read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic