How to achieve such JButton ?

https://www.pekao24.pl/images/kbrd/button20.gifthanks for helpMessage was edited by: czako
[118 byte] By [czakoa] at [2007-11-27 0:50:18]
# 1
Implement a ButtonUI which renders that.
itchyscratchya at 2007-7-11 23:20:18 > top of Java-index,Desktop,Core GUI APIs...
# 2
1) how ?:)2) can i make button without using this graphic ?Message was edited by: czako
czakoa at 2007-7-11 23:20:18 > top of Java-index,Desktop,Core GUI APIs...
# 3

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...

DhruvaSagara at 2007-7-11 23:20:18 > top of Java-index,Desktop,Core GUI APIs...
# 4

> 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.

abillconsla at 2007-7-11 23:20:18 > top of Java-index,Desktop,Core GUI APIs...