# Java + Rounded Rectangle Buttons !!!!!



## Prashanti (Apr 24, 2006)

Hi!

Without much ado let's get straight to the problem.

I need to create Rounded Rectangle Buttons in java. 
Sounds very simple but I couldn't find any simple code to fix this problem!!! :down:

Code would be very helpful.

Please help!!!


----------



## Chicon (Jul 29, 2004)

Hi Prashanti,

Unfortunately, there's no direct way to modify the rectangular shape of a button (AWT or Swing) even if you know how to customize its look-and-feel. Therefore, it's normal you can't find _any simple code_.
BTW, if I were told to do such thing, I would use a borderless *JLabel* and a set of pre-build pictures showing the button I want in its different status : pressed, hovered, enabled, disabled, ... I would also make the mouse listener to check if the mouse pointer is within the 'clickable' area of the button.


----------

