Re: JButton with Multiple ImageIcons
- From: "Steve W. Jackson" <stevewjackson@xxxxxxxxxxx>
- Date: Mon, 19 May 2008 14:32:11 -0500
In article
<541732aa-8ed2-46fc-9b8a-826bcd956742@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
karlschmitt1969@xxxxxxxxxxxxxx wrote:
Hi,
I am evaluating the Java Swing toolkit
for a new project, and I would like to ask
if it is possible to add or place more than one ImageIcon
on top of a JButton?
Furthermore, is it possible to add multiple Strings with diffrent
text sizes and in diffrent fonts between to ImageIcons on to
a JButton surface.
____________________
| |
| <One Big Picture> |
| <Big Text> |
| <Small Text> |
| <Small Pictures> |
-----------------------------------|
Thanks in advance,
Karl
If you work hard enough, practically anything *might* be possible to put
on a JButton. But the real question is why you might want to try such a
thing.
A JButton represents a pushbutton, where you click it in order to invoke
some action. If your goal is to display various images and text, it
might be better to use multiple components for that purpose. If merely
for display, you could use JLabel. If the idea is that interaction with
a different part of the "button" invokes different actions, then
multiple buttons (and even JLabels or other things) might be a more
appropriate solution.
--
Steve W. Jackson
Montgomery, Alabama
.
- Follow-Ups:
- Re: JButton with Multiple ImageIcons
- From: Daniel Pitts
- Re: JButton with Multiple ImageIcons
- References:
- JButton with Multiple ImageIcons
- From: karlschmitt1969
- JButton with Multiple ImageIcons
- Prev by Date: JButton with Multiple ImageIcons
- Next by Date: Re: JButton with Multiple ImageIcons
- Previous by thread: JButton with Multiple ImageIcons
- Next by thread: Re: JButton with Multiple ImageIcons
- Index(es):