Strange behaviour of mouse wheel listener
in
Programming Questions
•
2 years ago
I have included in my code the mousewheel listener event from the Processing wiki
addMouseWheelListener
(
new java.awt.event.MouseWheelListener()
{
public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt)
{
mouseWheel(evt.getWheelRotation());
}
}
);
The odd thing is, when I use the mouse wheel it seems to change my font settings. I have several fonts loaded for different parts of my application and it swaps or changes the fonts round occasionally and randomly when I use the mouse wheel. How strange.
I've looked through my code and there is nothing obvious as to why this is happening. It only happens occasionally and for no clear reason. Does anyone know why this is?
If it is an unsolvable problem, does anyone know an alternative way of using the mouse wheel?
1