public void loadCaptchaImage(PacketCaptchaImage p) {
        if (!p.hasCaptcha) {
            JOptionPane.showMessageDialog(this, p.key, "Error", JOptionPane.ERROR_MESSAGE, null);

            this.setVisible(false);

            mf.cancelRegistration();

            return;
        }

        try {
            img = ImageIO.read(new ByteArrayInputStream(p.imageData));
        } catch (IOException ex) {
            Logger.getLogger(CaptchaPanel.class.getName()).log(Level.SEVERE, null, ex);
        }
        this.key = p.key;

        txtAns.setText("");
        this.setVisible(true);

        drawCaptchaImage();
    }