Archief | Swing

Swing Loading Animation

9 mrt

Ik heb een “bezig met laden” component gemaakt voor Swing.

Screenshot Circle Animation

De features:

  • Werkt niet met afbeeldingen
  • Past zich aan aan de Look And Feel van het OS
  • Past zich automatisch aan aan de grootte van het component

Klik hier om de jar te downloaden

Met de volgende code kan de demo gestart worden:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
import javax.swing.JFrame;
import semantica.util.swing.CircleAnimation;

public class CircleAnimationTest {
    public static void main(String[] args) {
        JFrame f = new JFrame();
        f.getContentPane().add(new CircleAnimation());
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setTitle("Circle Animation");
        f.pack();
        f.setLocationRelativeTo(null);
        f.setVisible(true);
    }
}