public ProgressDialog() {
		super(false, false, true, INITIAL_WIDTH, INITIAL_HEIGHT, MINIMUM_WIDTH, MINIMUM_HEIGHT);

		setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
		addWindowListener(
			new WindowAdapter() {
                                @Override
				public void windowClosing(WindowEvent e) {
					setCanceled(true);
					close(); // Explicit close since the GUI might be stuck if an exception occured in the thread responsible for handling the cancel.
				}
			}
		);

		cancel.addActionListener(this);

		setMinimum(0);
		setMaximum(1);

		// Setup GUI
		JPanel panel = new JPanel();

		GridBagLayout gb = new GridBagLayout();
		GridBagConstraints c = new GridBagConstraints();

		panel.setLayout(gb);

			// Setup GridBagLayout
			c.anchor = GridBagConstraints.WEST;
			c.insets = new Insets(0,2,0,2);

			c.gridwidth = GridBagConstraints.REMAINDER;
			c.weightx = 1.0;
			gb.setConstraints(note, c);
			panel.add(note);

			c.gridwidth = GridBagConstraints.RELATIVE;
			c.weightx = 0.0;
			Dimension dim = new Dimension(150,25);
			bar.setStringPainted(true);
			bar.setMinimumSize(dim);
			bar.setMaximumSize(dim);
			bar.setPreferredSize(dim);
			gb.setConstraints(bar, c);
			panel.add(bar);

			c.gridwidth = GridBagConstraints.REMAINDER;
			c.weightx = 1.0;
			gb.setConstraints(cancel, c);
			panel.add(cancel);

	    getContentPane().add(panel);
	}