In this post, we will see how to resolve How do I show the bottom background to the buttons?
Question:
I have two classes, one where I create the frame and all the other things, and the class “RoundedButton”, that is extended to JButton, where I modify the buttons in order to make it Rounded. When I run the programme and hover the mouse over the button the bottom background disappears. This is the class RoundedBotton:Best Answer:
So, on MacOS, you’re “roll over” workflow doesn’t work for me AND, it also paints the focus rectangle, which isn’t pretty…
So, instead of doing this…

Oh, and calling
setPreferredSize
is a really bad ideaIf you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com
Leave a Review