BannerPanel with 2 icons

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

BannerPanel with 2 icons

Postby flyerfred » Fri Dec 12, 2008 4:45 am

Hello,

I am using BannerPanel objects to create headers in some dialogs. From my point of view, it would be nice to be able to set 2 icons in this panel (icons or components). A use case would be to set an icon on the left side of the title, and a component on the right side (this is actually my need).

Then the API could have a method public void setIconComponent(JComponent iconComponent, int location), where location could be set to SwingConstant.EAST or SwingConstant.WEST.

Thank you,

BR - Frédéric Tardieu
flyerfred
 
Posts: 210
Joined: Wed Oct 17, 2007 12:40 pm
Location: Vienna

Re: BannerPanel with 2 icons

Postby JIDE Support » Fri Dec 12, 2008 8:53 am

BannerPanel is open source so feel free to change it to fit your need. If the change is general, feel free to contribute back.

There is setTitleIconLocation method to adjust the icon position. The value could be SwingConstants.TRAILING or SwingConstants.LEADING (or EAST and WEST). In fact you can also call getTitleLabel and cast it to JLabel and set your own icon. Since it is open source, you can see exactly how it is implemented and extend it to fit your need.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 16 guests

cron