public BaseMethodPanel(JFrame frame, QueryDefinition query, T instance) throws MalformedURLException {
		super(false);
		this.frame = frame;
		this.query = query;
		this.query.setRequest(instance);
		
		try {
			this.setName(query.getName());
			this.setLayout(new BorderLayout());
			
			JPanel panel = new JPanel();
			panel.setLayout(new BorderLayout());
			this.id = new JTextField();
			this.id.setText(query.getId());
			this.id.getDocument().addDocumentListener(new DocumentListener() {

				@Override
				public void changedUpdate(DocumentEvent arg0) {
					try {
						
						String id = BaseMethodPanel.this.id.getText();
						BaseMethodPanel.this.query.setId(id.trim());
						stateChanged(null);
						
					} catch (Exception e1) {
						logger.error("Error updating query id.", e1);
					}
				}

				@Override
				public void insertUpdate(DocumentEvent arg0) {
					changedUpdate(arg0);
				}

				@Override
				public void removeUpdate(DocumentEvent arg0) {
					changedUpdate(arg0);
				}
			});
			
			panel.add(new JLabel("Query Id:"), BorderLayout.WEST);
			panel.add(this.id, BorderLayout.CENTER);
			add(panel, BorderLayout.NORTH);

			this.views = new JTabbedPane();
			this.views.setTabPlacement(JTabbedPane.LEFT);
			
			this.requestView = new XmlViewer(false, query.getDocument(), getRequestValidator());
			this.responseView = new XmlViewer(true, null, getResponseValidator(), query);
			
			this.views.addTab("Request", this.requestView);
			this.views.addTab("Response", this.responseView);
			
			this.views.addChangeListener(this);
			
			add(this.views, BorderLayout.CENTER);
			
			panel = new JPanel();
			panel.setLayout(new BorderLayout());
			this.executeBtn = new JButton("Execute");
			panel.add(this.executeBtn, BorderLayout.WEST);
			this.executeBtn.addActionListener(this);
	
			add(panel, BorderLayout.SOUTH);
		} catch (Exception e) {
			System.err.println(Utilities.getStackTrace(e));
			JOptionPane.showMessageDialog(this, Utilities.getStackTrace(e), e.getMessage(), JOptionPane.ERROR_MESSAGE);
		}
	}