> it is importan to be able to add jpanels and other components on a jbutton
> to have some complex layout design on a jutton. for example text wrapping
> arond an image. With the text having different sizes and fonts
That can be accomplished in html with css style elements float and font.
Can swing text components use css?
Sounds like a horrible button.

Signature
Mike W
> it is importan to be able to add jpanels and other components on a
> jbutton to have some complex layout design on a jutton.
It is not important, it is bullshit. A button has a special purpose,
which is not doing some compley layouting, but just occupying some
small screen estate, presenting a label and maybe an icon (advanced
feature) and an opportunity to click on it.
It is your own wishful thinking and an apparent attempt to relaize a
rather awful design that makes you think it is an important must-have
feature to add components to a button.
Unless you step back, look at your design and change it to something
useful you will not solve that problem. Which is a home-made problem,
only existing becaus of your design.
> for example text wrapping arond an image. With the text having
> different sizes and fonts
In a button? Get real man. How awful do you want your GUI to look like
and behave? How large should this button from hell become? Occupying
1/3 of the screen just because you want to have a super fancy label?
Should it become so large that users feel the urge to punch this
abomination with a fist?
Robert Ludewig - 15 Dec 2003 00:25 GMT
ok, I tell you what I intended , it is very simple put doesn't seem to be
possible with plain html:
The buttonlabel shall have one character in its very center. And another one
at the top left corner (in another font and a very small fontsize).
The small character in that corner must be totally at the top and left
border of the button, leaving no white space between the edge of the button
and the charcter.
When the button gets resized the small char must still be aligned that way
and the big char must stay in the center ...
I haven't found a way to fromat that in html, there is ALWAYS some white
space between the samll char and the edge of the button. I tried <div> and
<table> nothing.