I add several JButtons to JPanel, and setOpaque(false) for JPanel. When I move mouse onto the JButton, here appears a square under the button,and quickly disappears,which makes me feel awful.Does anyone know what is wrong?
(sorry for my poor English)
I add several JButtons to JPanel, and setOpaque(false) for JPanel. When I move mouse
Share
False is the default value for setOpaque as stated in the JComponent javadoc.
This is related to the effort it made to draw the components on the screen, when the property is set to true, then all the pixels of the component are drawn onscreen.