Class Swirl

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class Swirl extends JPanel
The Swirl class shows a swirling progress icon in a panel.
Since:
3.2.1
Author:
Peter Hollemans
See Also:
  • Constructor Details

    • Swirl

      public Swirl()
      Creates a new swirl.
  • Method Details

    • paintComponent

      public void paintComponent(Graphics g1d)
      Overrides:
      paintComponent in class JComponent
    • setSpeed

      public void setSpeed(double rotations)
      Sets the swirl speed, by default two rotations per second.
      Parameters:
      rotations - the number of rotations per second in the range [0.1 ... 10].
    • start

      public void start()
      Starts the swirling motion to indicate progress.
    • stop

      public void stop()
      Stops the swirling motion.
    • main

      public static void main(String[] argv)
      Tests this class.
      Parameters:
      argv - the array of command line parameters.