Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

creating a table interface in java

How can I create an interface similar like the following in Java (tweetie)?

alt text

I was thinking of using a JTable with one columns and customized cell that has an image in it...not sure how to do it though.

like image 266
aherlambang Avatar asked Mar 06 '26 08:03

aherlambang


1 Answers

If you are only going to have one column, than you can just use JList and it will be a little easier. But to answer your question, you need to create a cell renderer that can be used to represent the object in the list. The renderer would have a method (getListCellRendererComponent) which would return a Component that can be used to represent each item.

like image 187
unholysampler Avatar answered Mar 07 '26 21:03

unholysampler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!