I have a JButton that activates a process that can take some time to complete. I would like to have the image on the JButton spin while the process completes it's task. I have extended the JButton class to a SpinButton class, in order for me to be able to override it's paint() method. I am able to get the image to rotate, but not spin on a given axis. Additionally, there is some funky behavior occurring. Appears the renderer is colliding with other adjacent JButtons images. Any help would be appreciated.
Joined: Jan 09, 2001
Hi Rugby, I haven't had much time to mess with this. But here is my first approach.
I got the middle.gif from the Sun Java 2 tutorial on button demo or something like that. It is almost square in size. I am not sure how this will work if your icon is not quite square. Enjoy, Manfred.
Joined: Nov 07, 2000
"Rugby Geek", Thanks for participating here at the Ranch. However, the name you are using does not comply with the naming convention described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name (not fictitious monikers). Please log in with a new name which meets the requirements. Thanks. Sean