I have created a custom JButton class for representing spaces on a monopoly board. The game is multiplayer so a lot of the information needed to draw the button is held on the server (accessed via RMI).
My problem is that when I mouse over the button it automatically seems to call repaint() (and draws a border). This makes the program very slow as it is having to pull data off the server every time the mouse is over one of the spaces.
I have been trying to find a way to stop this happening but everyone else on the internet seems to be having a problem with getting the button to repaint() rather than stopping it.
Does anyone know of a method I can override or a property I can change to stop this happening?