Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
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
Forum:
Swing / AWT / SWT
How to understand functionality of getListCellRendererComponent()?
Dp Chovati
Greenhorn
Posts: 15
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus); ProductInfoExt prod = (ProductInfoExt) value; if (prod != null) { setText("<html><center>" + prod.getReference() + " - " + prod.getName() + " - " + Formats.CURRENCY.formatValue(prod.getPriceSell()) // + "<br>" + prod.getStockUnits() + " | " + Formats.DATE.formatValue(prod.getMemoDate()) + " | " + prod.getPriceSellTax(tax) ); Image img = tnbprod.getThumbNail(prod.getImage()); setIcon(img == null ? null :new ImageIcon(img)); } return this; }
Staff note (
Liutauras Vilda
) :
Codetags were added by staff
Rob Camick
Rancher
Posts: 3324
32
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
So what exactly is your question?
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
show multiple image Using Jlist
JList and images
Problem with JComboBox background colour when using customer renderer
Help implementing DefaultListCellRenderer.
actionevent in jcombobox of jtable
More...