Hello,
I'm using a recursive algorithm to solve a problem, which periodically calls upon a sprite to be moved around the swing GUI using the Observer and Observable mechanism.
However, being recursive, the calls to update the GUI via Observer's update() method are only executed after all the recursive method calls have been popped off the method call stack. (Basically the sprite jumps to it's finishing location, rather than moving in visible steps.)
I have solved this problem with another Thread class, but was wondering if anyone knew of a simpler way.
Also, just out of interest, does anyone know how to make an Icon appear as normal when appearing on a JButton that has been disabled (i.e. colour, not greyed out as disable icons normally look).
Any suggestions to either of these questions would be much appreciated!!
Oxy
we are all of us living in the gutter.
But some of us are looking at the stars.
I'm using a recursive algorithm to solve a problem, which periodically calls upon a sprite to be moved around the swing GUI using the Observer and Observable mechanism.
However, being recursive, the calls to update the GUI via Observer's update() method are only executed after all the recursive method calls have been popped off the method call stack. (Basically the sprite jumps to it's finishing location, rather than moving in visible steps.)
I have solved this problem with another Thread class, but was wondering if anyone knew of a simpler way.
Also, just out of interest, does anyone know how to make an Icon appear as normal when appearing on a JButton that has been disabled (i.e. colour, not greyed out as disable icons normally look).
Any suggestions to either of these questions would be much appreciated!!
Oxy
we are all of us living in the gutter.
But some of us are looking at the stars.