statusMessage.setText("Storing " + nameres);
statusMessage.setText(Messages.getString("DocumentView.39") + nameres);
	private void saveAs()	{		new Thread()		{			public void run()			{				//Get the name to save the resource as				String nameres = JOptionPane.showInputDialog(null, "Name of the XML resource (extension incluse)");				if (nameres != null)				{					try					{						//Change status message and display a progress dialog						statusMessage.setText("Storing " + nameres);						if (collection instanceof Observable)							((Observable) collection).addObserver(new ProgressObserver());						progress.setIndeterminate(true);						progress.setVisible(true);											//Create a new resource as named, set the content, store the resource						XMLResource result = null;						result = (XMLResource) collection.createResource(URIUtils.encodeXmldbUriFor(nameres).toString(), XMLResource.RESOURCE_TYPE);						result.setContent(text.getText());						collection.storeResource(result);						client.reloadCollection();	//reload the client collection						if (collection instanceof Observable)							((Observable) collection).deleteObservers();					}					catch (XMLDBException e)					{						ClientFrame.showErrorMessage("XMLDBException: " + e.getMessage(), e);					} catch (URISyntaxException e) {						ClientFrame.showErrorMessage("URISyntaxException: " + e.getMessage(), e);					}					finally					{						//hide the progress dialog						progress.setVisible(false);					}				}			}		}.start();	}