|
Java™ by example!
|
|
|
How can I create a rounded JButton?
Extend the JButton class and override the paintComponent and paintBorder methods. To ensure that only mouse-clicks are accepted within the round shape, override the contains method too. Main.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|