tags:

views:

238

answers:

5

Ideally I'd like a way to enable the mousewheel for scrolling in old compiled java runtime apps, but java code to explicitly utilize it for an individual app would suffice.

+1  A: 

Mousewheel scrolling is supported in current Swing applications. You could try compiling your application using JDK 1.4, 1.5 or 1.6. Depending on the complexity and environment moving to a new version may or may not be a viable option.

This tutorial shows how to write your own mousewheel listener if you want something different to the normal behaviour.

RichH
MouseWheelListener was introduced in 1.4, according to the API docs that jjnguy posted.
Michael Myers
You are correct. I've updated my comment to include 1.4 - thanks!
RichH
A: 

Without access to the source code, you can't do it. If you do have access to the source, then do what RichH said.

Michael Myers
+1  A: 

Take a look Pushing Pixels blog: http://www.pushing-pixels.org/index.php?s=mouse+wheel

Kind Regards

marcospereira
+2  A: 

You shouldn't have to recompile against 1.5 or 1.6 to get mousewheel, unless you wrote custom components. The mousewheel behaviors were added to the swing classes, so just running old java apps against the new JRE should have mousewheel support without having to do anything (at least in scrollable/JScrollPane based stuff)

John Gardner