You can create such a button with such graphics without using the graphic :). But that would require a lot of knowlegde and tedious programming overriding the ButtonUI as mentioned.
The better easier option is to load the image as the icon for that button and
button.setMargin(new Insets(0,0,0,0));
button.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
This code will give you the results you want, in quite a satisfactory manner...
> You can create such a button with such graphics
> without using the graphic :). But that would require
> a lot of knowlegde and tedious programming overriding
> the ButtonUI as mentioned.
> The better easier option is to load the image as the
> icon for that button and
> > button.setMargin(new Insets(0,0,0,0));
> button.setBorder(BorderFactory.createEmptyBorder(0,0,0
> ,0));
>
> This code will give you the results you want, in
> quite a satisfactory manner...
Good advice - this does work very well.