Imagine an interface "Effect":
and a collection of these:
HashMap<
String, Effect> effects = new HashMap<String, Effect>();
map.put("circle", new CircleEffect());
map.put("square", new SquareEffect());
...
and then a paintComponent() method that does:
Now you can add as many effects as you want, and the paintComponent() method doesn't change. No if/else, no switch, just object oriented goodness.