"An error occurred while retrieving collections list", e);
"An error occurred while retrieving collections list.", e);
	private JComponent createQueryBox() {		JPanel inputVBox = new JPanel();		inputVBox.setLayout(new BorderLayout());				Box historyBox= Box.createHorizontalBox();		JLabel label= new JLabel("History: ");		historyBox.add(label);		final JComboBox historyList= new JComboBox(history);		for(Iterator i = client.queryHistory.iterator(); i.hasNext(); ) {			String item = (String) i.next();			if(item.length() > 40)				item = item.substring(0, 40);			history.addElement(item);		}		historyList.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				String item = (String)client.queryHistory.get(historyList.getSelectedIndex());				query.setText(item);			}		});		historyBox.add(historyList);		inputVBox.add(historyBox, BorderLayout.NORTH);                JPanel queryPanel = new JPanel();        queryPanel.setLayout(new BorderLayout());        label = new JLabel("XQuery:");        queryPanel.add(label, BorderLayout.NORTH);                query = new ClientTextArea(true, "XQUERY");        query.setElectricScroll(1);		query.setEditable(true);		query.setPreferredSize(new Dimension(350, 200));		queryPanel.add(query, BorderLayout.CENTER);        inputVBox.add(queryPanel, BorderLayout.CENTER);        		Box optionsPanel = Box.createHorizontalBox();                label = new JLabel("Context:");        optionsPanel.add(label);        		final Vector data= new Vector();		try {			Collection root = client.getCollection("/db");			data.addElement(collection.getName());			getCollections(root, collection, data);		} catch (XMLDBException e) {			ClientFrame.showErrorMessage(					"An error occurred while retrieving collections list", e);		}		collections= new JComboBox(data);		collections.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				int p = collections.getSelectedIndex();				String context = (String)data.elementAt(p);				try {					collection = client.getCollection(context);				} catch (XMLDBException e1) {				}			}		});        optionsPanel.add(collections);		label= new JLabel("Display max.:");        optionsPanel.add(label);        		count= new SpinnerNumberModel(100, 1, 10000, 50);		JSpinner spinner= new JSpinner(count);		optionsPanel.add(spinner);        		URL url= getClass().getResource("icons/Find24.gif");		JButton button= new JButton("Submit", new ImageIcon(url));        optionsPanel.add(button);		button.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				doQuery();			}		});        optionsPanel.add(button);        		inputVBox.add(optionsPanel, BorderLayout.SOUTH);		return inputVBox;	}