private void drawEdge(Graphics g, Edge e) {
        String weight = "";
        weight += e.getWeight();
        int x1 = e.getStart().getX();
        int y1 = e.getStart().getY();
        int x2 = e.getEnd().getX();
        int y2 = e.getEnd().getY();
        g.setColor(Color.LIGHT_GRAY);
        if (e.getStart() != e.getEnd()) {
            /**
             * Edge between u and v where u != v
             */
            g.drawLine(x1, y1, x2, y2);
        } else {
            /**
             * Edge between u and u itself
             */
            g.drawOval(x1 - 4, y1 - 4, 30, 30);
        }
        if (e.isVisited()) {
            drawVisitedEdge(g, e);
        }
        if (e.isDirected() && e.getStart() != e.getEnd()) {
            drawArrowhead(g, e);
        }
        g.setFont(new Font("Sans", 1, 10));
        int yModifier = 10;
        int xModifier = -10;
        if ((x1 > x2 && y1 > y2) || (x1 < x2 && y1 < y2)) {
            yModifier = -10;
            xModifier = 10;
        }
        g.setColor(Color.BLACK);
        g.drawString(weight, ((x1 + 20 + x2 + 20)) / 2 + xModifier, ((y1 + 20 + y2 + 20)) / 2);


    }