Change Shape of button


#1

Hi,

How to change shape of button as per attached file .,

Thanks.
satyakaama


#2

All drawing happens in the LookAndFeel class, in this case the drawButtonBackground method of the L&F class, create your own LookAndFeel class and implement that method, then apply that look and feel to the buttons you want.


#3

thank you :slight_smile:


#4

Hi Jules,

I have created a custom shaped button using Shape Button class. The paint method of this class not have a drawButtonText method to enable me to get a text for this button. How can I get some text to be visible on this button, exposing setButtontext() method.

Thanks 


#5

Don't quite understand what you mean - perhaps just overload the drawButton method and draw whatever text you need?