public void paint(Graphics g_) {
        super.paint(g_);
        Graphics2D g = (Graphics2D) g_;
        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

        if (mBreadboard.sockets != null) {
            /* Draw socket input connections */
            for (int x = 0; x < getColumnCount() - 1; x++) {
                for (int y = 0; y < getRowCount() - 1; y++) {
                    if (mBreadboard.sockets[x][y] != null) {
                        Socket sock = mBreadboard.sockets[x][y];
                        int x1, y1, x2, y2;
                        for (int row : sock.getInputPinNumbers()) {
                            x1 = getPinLocation(sock.getColumn(), row).x;
                            y1 = getPinLocation(sock.getColumn(), row).y;
                            x2 = getSocketLocation(sock.getColumn(), sock.getRow()).x;
                            y2 = getSocketLocation(sock.getColumn(), sock.getRow()).y + 20;
                            g.drawLine(x1, y1, x2, y2);
                        }
                    }
                }
            }
            /* Draw socket output connections */
            for (int x = 1; x < getColumnCount(); x++) {
                for (int y = 0; y < getRowCount(); y++) {
                    if (mBreadboard.pins[x][y] != null) {
                        Pin pin = mBreadboard.pins[x][y];
                        Socket sock;
                        int x1, y1, x2, y2;
                        if ((sock = pin.getSourceSocket()) != null) {
                            x1 = getPinLocation(x, y).x;
                            y1 = getPinLocation(x, y).y;
                            x2 = getSocketLocation(sock.getColumn(), sock.getRow()).x + 50;
                            y2 = getSocketLocation(sock.getColumn(), sock.getRow()).y + 20;
                            g.drawLine(x1, y1, x2, y2);
                        }
                    }
                }
            }
        }

    }