File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes wraping in JTable cell Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "wraping in JTable cell" Watch "wraping in JTable cell" New topic
Author

wraping in JTable cell

tadi raja
Ranch Hand

Joined: Jul 07, 2008
Posts: 109
Hi to everyone,
I want to show 20 number of image icons in JTable cell(last column), i can put icons upto 10 only,the remaining icons are not shown,is there any way to wrap that cell so that i can show 20 icons using wrapping in JTable cell. please provide any sample demo program,so that i can implement in my program ...

Thank you in advance ..
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

How are you displaying the images right now? Custom renderer?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
tadi raja
Ranch Hand

Joined: Jul 07, 2008
Posts: 109
yah using customcellrenderer .. if i extend JTextArea it can wrap the line because JTextArea having that property of wrap the line,but i cann't add an image icon to JTextArea directly.. how to solve it ??
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

Consider JPanel instead of JTextArea. JPanel with flow layout can also wrap contents. You can out the icons inside JLabels and add the labels to the panel.
tadi raja
Ranch Hand

Joined: Jul 07, 2008
Posts: 109
cau you please provide me any sample example by extend JPanel so that we can implement in my code

thnak you in advance
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

Sure.
Read this
tadi raja
Ranch Hand

Joined: Jul 07, 2008
Posts: 109
please provide me any possible solutions for this post, its very urgent !!!
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

http://faq.javaranch.com/java/ShowSomeEffort
http://faq.javaranch.com/java/NotACodeMill
http://faq.javaranch.com/java/EaseUp
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wraping in JTable cell