e.printStackTrace(); request = null; error = true; displayTabbedPane.setSelectedIndex(0);
_request = null;
    private void updateRequest(int panel) {        if (error) return;        if (editable && panel == 0) {            // we must parse the rawTextArea            try {                if (request == null) request = new Request();                request.read(new ByteArrayInputStream(rawTextArea.getText().getBytes()));                String cl = request.getHeader("Content-Length");                if (cl != null) {                    byte[] content = request.getContent();                    if (content == null) {                        request.setHeader("Content-Length","0");                    } else {                        request.setHeader("Content-Length", Integer.toString(content.length));                    }                }                validPanel[panel] = false;            } catch (Exception e) {                System.err.println("Error trying to parse the text area : " + e);                e.printStackTrace();                request = null;                error = true;                displayTabbedPane.setSelectedIndex(0);                return;            }        } else if (editable && panel == 1) {            // we must update based on the tables            try {                if (request == null) request = new Request();                request.setMethod(methodTextField.getText());                request.setURL(pathTextField.getText());                ParameterTableModel ptm = (ParameterTableModel)parameterTable.getModel();                String[][] params = ptm.getParameters();                // request.setParameters(params);                validPanel[panel] = false;            } catch (Exception e) {                System.err.println("Error trying to parse the tabular view : " + e);                e.printStackTrace();                error = true;                displayTabbedPane.setSelectedIndex(1);                return;            }        }        error = false;    }