
Signature
Regards
Jamie
Remove YOURHEAD to reply
I don't know if there exists good tutorials (though I have a good book on
the subject)
but the best way to learn how everything works is to look at the source code
of the look & feel classes within the JDK source code you can find on Sun's
website.
Nevertheless, if you look at this code you will find that the best way to
have round
corners is to create a RoundedBorder ;-) (i.e. you won't need to modify the
Button UI) In fact, most of the time you won't need to modify this class to
achieve what you want, the only reason to modify it would be to change its
behaviour.
Last point you should also know that the Java L&F classes are sometimes
a little bit "buggy" when deadling with special L&F due to lazys Sun's
programmers. I have pointed this problem with the Sun's Java bug parade
but have not checked yet if changes have been included within Tiger.
Hope this helps
Cedric Lefebvre
cedric.lefebvre@nospam.free.fr
> I am wanting to not change myButtonUI to give my button rounded corners etc
> but haven't really got much of an idea what to change etc. Does anyone know
> any good online tutorials talking through what is good to change in here or
> could anyone point me in the right direction.
Jamie - 29 Mar 2005 12:40 GMT
I have had a look through the code and I don't understand how the ButtonUI
picks up the Border class.
Such as in windows look and feel there are three classes
WindowsLookAndFeel
WindowsButtonUI
WindowsBorders
I understand that in WindowsLookAndFeel it sets the UI for button to
WindowsButtonUI in the uiDefaults table.
But then I look in the WindowsButtonUI class and don't see any reference to
WindowsBorders.
What is the title of the book you have that is good? Does it talk you
through and explain the whole look and feel well?
Thanks again
>I don't know if there exists good tutorials (though I have a good book on
> the subject)
[quoted text clipped - 28 lines]
> or
>> could anyone point me in the right direction.
John McGrath - 30 Mar 2005 01:52 GMT
> I understand that in WindowsLookAndFeel it sets the UI for button to
> WindowsButtonUI in the uiDefaults table.
>
> But then I look in the WindowsButtonUI class and don't see any reference
> to WindowsBorders.
The default border is also in the UIDefaults table. This is initialized
in the WindowsLookAndFeel class (search for "Button.border"), and
installed in the button in the UI delegate superclass (BasicButtonUI).

Signature
Regards,
John McGrath