permaculture playing cards*
The moose likes Swing / AWT / SWT and the fly likes icons are not displaying in JTable last column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "icons are not displaying in JTable last column" Watch "icons are not displaying in JTable last column" New topic
Author

icons are not displaying in JTable last column

tadi raja
Ranch Hand

Joined: Jul 07, 2008
Posts: 109
Hi to All,
This is Raja,i am implementing one sample JTable program, i want to insert icons dynamically to JTable last column,the icons are inserted dynamically,but here problem is that total icons are not displaying(only few are displayed) line wrap is not working here in JTable last column,the total icons are displaying only when added icons to second time to JTable last column(here line wrap wors at second time). i want to display total icons at first time only with line wrap, please give me any suggestions.here attached the code.

The below code works for line wrap in JTable last column at second time.i want to insert total icons at first time only with line wrap..



Thank You in advance...
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

This is a JTable you're asking about? Then you don't need any of that code. The cells of a JTable are by default rendered by a JLabel, and JLabel can display an Icon. At most you might need a TableCellRenderer to call the setIcon method.
tadi raja
Ranch Hand

Joined: Jul 07, 2008
Posts: 109
here attached the screen shots

In first screenshot, the icons are not matched with tolltip texts and also here no line wrap
In second screen shot, icons are displaying with line wrap containg icons.

Here it works for second time only,not for the first tme.i attached code works fine for the second time well.


[Thumbnail for Before-linewrap.JPG]

tadi raja
Ranch Hand

Joined: Jul 07, 2008
Posts: 109
Second screen shot as attached ...


[Thumbnail for afterLinewrap.JPG]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: icons are not displaying in JTable last column
 
Similar Threads
Images in a JTable
Fluid Motion Moving Circles Smooth -solved-
change pixel value to cell coordinate
icons are not getting wrapped into multiple lines in JTable cell
icons not wrap in JTable cell