private static void paintElements(Graphics2D g2d, Model m) {
        for (final Element e : m.getElements()) {
            if (e != null) {
                e.drawSelf(g2d);
            }
        }
    }