1. Cautionary tale about buttons & simple animation coderanch.comThis is for anyone who hasn't yet got to Chapter 12 in the Head First Java book and is as clueless as I seem to be ... or for any old-timers who would like a chuckle ... The problem is to construct a simple animation: a circle that moves from the top left of the window to the bottom right; the ... |
2. Animation pause button coderanch.comHi, I am very new to animation in Swing, and I'm having a problem understanding the best way to implement a pause button. I have implemented a class which extends JPanel and which uses a Timer to do some animation. When the Timer calls actionPerformed(), a call to repaint() is made. In the paintComponent() method I am simply drawing random shapes ... |
3. Triggering an animation from a button coderanch.comAnother noob question... why does my moveBall() method work correctly from my runGui() method but not when called from my ActionListener class? The call in MidiListener does run the method, but the GUI freezes and does not update until it's finished. I think it's something to do with threads...? package musicmaker; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class FindBug2 { ... |