shell.setContentType("text/plain; charset=UTF-8");
	private void setupComponents() {		JToolBar toolbar = new JToolBar();		URL url = getClass().getResource("icons/Up24.gif");		JButton button = new JButton(new ImageIcon(url));		button.setToolTipText("Go to parent collection");		button.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				goUpAction(e);			}		});		toolbar.add(button);		url = getClass().getResource("icons/New24.gif");		button = new JButton(new ImageIcon(url));		button.setToolTipText("Create new collection");		button.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				newCollectionAction(e);			}		});		toolbar.add(button);		url = getClass().getResource("icons/Add24.gif");		button = new JButton(new ImageIcon(url));		button.setToolTipText("Stores one or more files to the database");		button.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				uploadAction(e);			}		});		toolbar.add(button);		url = getClass().getResource("icons/Delete24.gif");		button = new JButton(new ImageIcon(url));		button.setToolTipText("Delete selected files or collections");		button.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				removeAction(e);			}		});		toolbar.add(button);				url = getClass().getResource("icons/Preferences24.gif");				button = new JButton(new ImageIcon(url));				button.setToolTipText("Edit owners/permissions for selected resource");				button.addActionListener(new ActionListener() {					public void actionPerformed(ActionEvent e) {						setPermAction(e);					}				});				toolbar.add(button);		toolbar.addSeparator();		url = getClass().getResource("icons/Export24.gif");		button = new JButton(new ImageIcon(url));		button.setToolTipText("Create backup");		button.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				backupAction(e);			}		});		toolbar.add(button);		url = getClass().getResource("icons/Import24.gif");		button = new JButton(new ImageIcon(url));		button.setToolTipText("Restore files from backup");		button.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				restoreAction(e);			}		});		toolbar.add(button);		toolbar.addSeparator();		url = getClass().getResource("icons/keyring-small.png");		button = new JButton(new ImageIcon(url));		button.setToolTipText("Manage users");		button.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				newUserAction(e);			}		});		toolbar.add(button);		JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT);		split.setResizeWeight(0.5);		// create table for resources and collections		fileman = new JTable();		fileman.setModel(resources);		fileman.addMouseListener(new TableMouseListener(this));		ResourceTableCellRenderer renderer = new ResourceTableCellRenderer();		fileman.setDefaultRenderer(Object.class, renderer);		JScrollPane scroll = new JScrollPane(fileman);		scroll.setMinimumSize(new Dimension(300, 150));		split.setLeftComponent(scroll);		JPanel panel = new JPanel(false);		panel.setLayout(new BorderLayout());		// command-history selection		Box hbox = Box.createHorizontalBox();		JLabel histLabel = new JLabel("History:");		hbox.add(histLabel);		historyCombo = new JComboBox();		historyCombo.addItemListener(new HistorySelectedAction());		hbox.add(historyCombo);		// shell window		doc = new DefaultStyledDocument();		shell = new JTextPane(doc);		shell.setFont(new Font("Monospaced", Font.PLAIN, 12));		scroll = new JScrollPane(shell);		KeyStroke enter = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);		KeyStroke up = KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0);		KeyStroke down = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0);		Keymap map = shell.getKeymap();		EnterAction enterAction = new EnterAction("enter");		BackHistoryAction backAction = new BackHistoryAction("back");		ForwardHistoryAction forwardAction = new ForwardHistoryAction("forward");		map.addActionForKeyStroke(enter, enterAction);		map.addActionForKeyStroke(up, backAction);		map.addActionForKeyStroke(down, forwardAction);		panel.add(hbox, BorderLayout.NORTH);		panel.add(scroll, BorderLayout.CENTER);		split.setRightComponent(panel);		statusbar = new JLabel();		statusbar.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));		getContentPane().add(split, BorderLayout.CENTER);		getContentPane().add(toolbar, BorderLayout.NORTH);		getContentPane().add(statusbar, BorderLayout.SOUTH);	}