there's 2 ways to create a button with rounded edges.
1. The first thing is to know that a JButton's edges are drawn by a Border. so we can override the Button's paintComponent or Graphics method and draw a circle or rounded rectangle and turn off the border.
2. We can create a custom border that draws a circle or rounded rectangle around any component and set the button,s border to it.