public void nicepaintGraph(Graphics gg, Boolean drawExtras) {
        lastpaintTime = System.currentTimeMillis();
        Iterator<Edge> ie = getGraph().edgeIterator();
        try {
            while (ie.hasNext()) {
                Edge e = ie.next();
                paint((Graphics2D) gg, e, getGraph(), drawExtras);
            }
        } catch (Exception ex) {
            System.err.println("(FastPaint: Paint Error:");
            ex.printStackTrace();
            try {
                Thread.sleep(100);
                ie = getGraph().lightEdgeIterator();
                while (ie.hasNext()) {
                    Edge e = ie.next();
                    paint((Graphics2D) gg, e, getGraph(), drawExtras);
                }
            } catch (Exception e1) {
                e1.printStackTrace();
                StaticUtils.addExceptiontoLog(e1, Application.blackboard);
            }
//            repaint();
        }
        gg.setColor(Color.darkGray);

        try {
            for (Vertex v : getGraph()) {
                GraphPoint l = v.getLocation();
                gg.setColor(GraphModel.getColor(v.getColor()));
                String s = v.getLabel();
                if (s == null)
                    s = "";
                int dl = s.length() * 4;
                int labelLength = 0;
                for(int i=0;i < s.length();i++) {
                    labelLength += gg.getFontMetrics().charWidth(s.charAt(i));
                }

                Font f = gg.getFont();
                int fontH = (int)Math.floor(f.createGlyphVector(
                        gg.getFontMetrics().getFontRenderContext(),
                        s).getVisualBounds().getHeight());
                paint((Graphics2D) gg, v,
                        zm(l.x) - v.getCenter().x, zm(l.y) - v.getCenter().y,
                        zm(l.x) - labelLength/2, zm(l.y) +
                        vertexRadius/2,
                        //fontH/2,
                        drawExtras);

                //paint((Graphics2D) gg, v,
                //        zm(l.x) - v.getCenter().x, zm(l.y) - v.getCenter().y,
                //        zm(l.x) - dl, zm(l.y) + vertexRadius / 2, drawExtras);
            }
        } catch (Exception e) {
            repaint();
        }
    }