[SOLVED] How to set an Icon to cell in WebTable?

Discuss here any questions about the WebLaF library.
Bugs can be posted directly to GitHub issues tracker.

[SOLVED] How to set an Icon to cell in WebTable?

Postby frizinator » Tue Aug 05, 2014 1:08 am

How would I go about doing this? I am attempting to retrieve the cell editor and set the icon, but it does not show. I'm trying to do the same rendering the WebFileTree does, but I cannot use the WebFileTree because I am using Apaches Compress API to browse archives.
frizinator
 
Posts: 12
Joined: Fri Dec 07, 2012 8:14 am

Re: How to set an Icon to cell in WebTable?

Postby mgarin » Tue Aug 05, 2014 10:51 am

WebTable works the same way JTable does, meaning you can read about JTable and apply that knowledge to WebTable in your application. The only difference between JTable and WebTable are some additional useful methods in WebTable which may be handy in case you know how to work with JTable.

Unfortunately I cannot help you to learn Swing basics, but I can point you to proper articles/examples.

I suggest you to read official JTable tutorial:
http://docs.oracle.com/javase/tutorial/ ... table.html
That will give you a general idea of how JTable content is displayed.
You may find other useful tutorials there as well.

You can also look for some answers on StackOverflow:
http://stackoverflow.com/questions/4941 ... table-cell
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg

Re: How to set an Icon to cell in WebTable?

Postby mgarin » Wed Aug 06, 2014 5:32 pm

Marking this one solved.
These tutorials/examples should clearly help with adding icons into table cells.
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg


Return to Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron