Question

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

Was it helpful?

Solution

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

OTHER TIPS

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)

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top