label = new JLabel("Directory:");
label = new JLabel(Messages.getString("UploadDialog.3"));
	public UploadDialog() {		super("Storing files ...");		GridBagLayout grid = new GridBagLayout();		getContentPane().setLayout(grid);		GridBagConstraints c = new GridBagConstraints();		c.insets = new Insets(5, 5, 5, 5);		JLabel label = new JLabel("Stored:");		c.gridx = 0;		c.gridy = 0;		c.anchor = GridBagConstraints.WEST;		c.fill = GridBagConstraints.NONE;		grid.setConstraints(label, c);		getContentPane().add(label);		byDirProgress = new JProgressBar();		byDirProgress.setStringPainted(true);		byDirProgress.setString("Calculating file sizes ...");		byDirProgress.setIndeterminate(true);		c.gridx = 1;		c.gridy = 0;		c.anchor = GridBagConstraints.EAST;		c.fill = GridBagConstraints.HORIZONTAL;		grid.setConstraints(byDirProgress, c);		getContentPane().add(byDirProgress);		label = new JLabel("Directory:");		c.gridx = 0;		c.gridy = 1;		c.anchor = GridBagConstraints.WEST;		c.fill = GridBagConstraints.NONE;		grid.setConstraints(label, c);		getContentPane().add(label);		currentDir = new JTextField(30);		currentDir.setEditable(false);		c.gridx = 1;		c.gridy = 1;		c.anchor = GridBagConstraints.EAST;		c.fill = GridBagConstraints.HORIZONTAL;		grid.setConstraints(currentDir, c);		getContentPane().add(currentDir);		label = new JLabel("Uploading file:");		c.gridx = 0;		c.gridy = 2;		c.anchor = GridBagConstraints.WEST;		c.fill = GridBagConstraints.NONE;		grid.setConstraints(label, c);		getContentPane().add(label);		currentFile = new JTextField(30);		currentFile.setEditable(false);		c.gridx = 1;		c.gridy = 2;		c.anchor = GridBagConstraints.EAST;		c.fill = GridBagConstraints.HORIZONTAL;		grid.setConstraints(currentFile, c);		getContentPane().add(currentFile);		label = new JLabel("Size:");		c.gridx = 0;		c.gridy = 3;		c.anchor = GridBagConstraints.WEST;		c.fill = GridBagConstraints.NONE;		grid.setConstraints(label, c);		getContentPane().add(label);		currentSize = new JLabel("0K");		c.gridx = 1;		c.gridy = 3;		c.anchor = GridBagConstraints.EAST;		c.fill = GridBagConstraints.HORIZONTAL;		grid.setConstraints(currentSize, c);		getContentPane().add(currentSize);		JLabel status = new JLabel("Progress:");		c.gridx = 0;		c.gridy = 4;		c.anchor = GridBagConstraints.WEST;		c.fill = GridBagConstraints.NONE;		grid.setConstraints(status, c);		getContentPane().add(status);		progress = new JProgressBar();		progress.setIndeterminate(true);		progress.setStringPainted(true);		c.gridx = 1;		c.gridy = 4;		c.anchor = GridBagConstraints.EAST;		c.fill = GridBagConstraints.HORIZONTAL;		grid.setConstraints(progress, c);		getContentPane().add(progress);		messages = new JTextArea(5, 50);		messages.setEditable(false);		messages.setLineWrap(true);		JScrollPane scroll =			new JScrollPane(				messages,				JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,				JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);		scroll.setBorder(BorderFactory.createTitledBorder("Messages"));		c.gridx = 0;		c.gridy = 5;		c.gridwidth = 2;		c.anchor = GridBagConstraints.WEST;		c.fill = GridBagConstraints.HORIZONTAL;		grid.setConstraints(scroll, c);		getContentPane().add(scroll);		closeBtn = new JButton("Cancel");		closeBtn.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				if ("Close".equals(closeBtn.getText()))					setVisible(false);				else {					cancelled = true;					closeBtn.setText("Close");				}			}		});		c.gridx = 0;		c.gridy = 6;		c.gridwidth = 2;		c.anchor = GridBagConstraints.EAST;		c.fill = GridBagConstraints.NONE;		grid.setConstraints(closeBtn, c);		getContentPane().add(closeBtn);				pack();	}