});
}; downloadLink.addKeyListener(keyListener); targetDir.addKeyListener(keyListener);
	private void init() throws Exception {		setLayout(new BorderLayout());		JPanel topPanel = new JPanel();		topPanel.setLayout(new GridBagLayout());		JPanel bottomPanel = new JPanel();		bottomPanel.setLayout(new BorderLayout());		abbrechen = new JMenuItem();		pause = new JMenuItem();		fortsetzen = new JMenuItem();		umbenennen = new JMenuItem();		zielordner = new JMenuItem();		fertigEntfernen = new JMenuItem();		partlisteAnzeigen = new JMenuItem();		menu = new JPopupMenu();		einfuegen = new JMenuItem();		IconManager im = IconManager.getInstance();		abbrechen.setIcon(im.getIcon("abbrechen"));		pause.setIcon(im.getIcon("pause"));		umbenennen.setIcon(im.getIcon("umbenennen"));		zielordner.setIcon(im.getIcon("zielordner"));		fertigEntfernen.setIcon(im.getIcon("bereinigen"));		partlisteAnzeigen.setIcon(im.getIcon("partliste"));		fortsetzen.setIcon(im.getIcon("pause"));		itemCopyToClipboard.setIcon(im.getIcon("clipboard"));		itemCopyToClipboardWithSources.setIcon(im.getIcon("clipboard"));		einfuegen.setIcon(im.getIcon("clipboard"));		popup.add(abbrechen);		popup.add(pause);		popup.add(fortsetzen);		popup.add(umbenennen);		popup.add(zielordner);		popup.add(fertigEntfernen);		popup.add(itemCopyToClipboard);		popup.add(itemCopyToClipboardWithSources);		popup.add(partlisteAnzeigen);		partlisteAnzeigen.setVisible(false);    	popup.add(itemOpenWithProgram);        itemOpenWithProgram.setIcon(im.getIcon("vlc"));		einfuegen.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				linkMenuActionPerformed(e);			}		});		menu.add(einfuegen);		GridBagConstraints constraints = new GridBagConstraints();		constraints.anchor = GridBagConstraints.NORTH;		constraints.fill = GridBagConstraints.BOTH;		constraints.gridx = 0;		constraints.gridy = 0;		constraints.gridwidth = 3;		constraints.gridheight = 1;		JPanel tempPanel = new JPanel();		tempPanel.setLayout(new BorderLayout());		tempPanel.add(linkLabel, BorderLayout.WEST);		tempPanel.add(downloadLink, BorderLayout.CENTER);		tempPanel.add(btnStartDownload, BorderLayout.EAST);		topPanel.add(tempPanel, constraints);		constraints.gridwidth = 3;		constraints.gridx = 0;		constraints.gridy = 1;		constraints.weighty = 1;		constraints.weightx = 1;		downloadLink.addKeyListener(new KeyAdapter() {			public void keyPressed(KeyEvent ke) {				if (ke.getKeyCode() == KeyEvent.VK_ENTER) {					btnStartDownload.doClick();				}			}		});		downloadLink.addMouseListener(new MouseAdapter() {			public void mouseClicked(MouseEvent e) {				if (e.getButton() == MouseEvent.BUTTON3) {					showLinkMenu(e.getX(), e.getY());				}			}		});		downloadModel = new DownloadModel();		DefaultTreeTableCellRenderer defaultTreeTableCellRenderer =			new DownloadTreeTableCellRenderer(downloadModel);		downloadTable = new DownloadTreeTable(downloadModel, defaultTreeTableCellRenderer);		TableColumnModel model = downloadTable.getColumnModel();		for (int i = 0; i < columns.length; i++) {			columns[i] = model.getColumn(i);			columnPopupItems[i] = new JCheckBoxMenuItem((String) columns[i]					.getHeaderValue());			final int x = i;			columnPopupItems[i].addActionListener(new ActionListener() {				public void actionPerformed(ActionEvent ae) {					if (columnPopupItems[x].isSelected()) {						downloadTable.getColumnModel().addColumn(columns[x]);						PositionManagerImpl.getInstance()								.setDownloadColumnVisible(x, true);						PositionManagerImpl								.getInstance()								.setDownloadColumnIndex(										x,										downloadTable												.getColumnModel()												.getColumnIndex(														columns[x]																.getIdentifier()));					} else {						downloadTable.getColumnModel().removeColumn(columns[x]);						PositionManagerImpl.getInstance()								.setDownloadColumnVisible(x, false);						for (int y = 0; y < columns.length; y++) {							try {								PositionManagerImpl										.getInstance()										.setDownloadColumnIndex(												y,												downloadTable														.getColumnModel()														.getColumnIndex(																columns[y]																		.getIdentifier()));							} catch (IllegalArgumentException niaE) {								;								//nix zu tun							}						}					}				}			});			columnPopup.add(columnPopupItems[i]);		}		columnPopupItems[0].setEnabled(false);		downloadTable.getColumnModel().getColumn(1).setCellRenderer(				new DownloadTableCellRenderer());		downloadTable.getColumnModel().getColumn(2).setCellRenderer(				new DownloadTableCellRenderer());		downloadTable.getColumnModel().getColumn(3).setCellRenderer(				new DownloadTableCellRenderer());		downloadTable.getColumnModel().getColumn(4).setCellRenderer(				new DownloadTableCellRenderer());		downloadTable.getColumnModel().getColumn(5).setCellRenderer(				new DownloadTableCellRenderer());		downloadTable.getColumnModel().getColumn(6).setCellRenderer(				new DownloadTablePercentCellRenderer());		downloadTable.getColumnModel().getColumn(7).setCellRenderer(				new DownloadTableCellRenderer());		downloadTable.getColumnModel().getColumn(8).setCellRenderer(				new DownloadTableCellRenderer());		downloadTable.getColumnModel().getColumn(9).setCellRenderer(				new DownloadTableVersionCellRenderer());		JTableHeader header = downloadTable.getTableHeader();		aScrollPane = new JScrollPane(downloadTable);		aScrollPane.setBackground(downloadTable.getBackground());		downloadTable.getTableHeader().setBackground(				downloadTable.getBackground());		aScrollPane.getViewport().setOpaque(false);		downloadTable.addMouseListener(new MouseAdapter() {		});		topPanel.add(aScrollPane, constraints);		constraints.gridx = 0;		constraints.gridy = 0;		constraints.weighty = 1;		bottomPanel.add(powerDownloadPanel, BorderLayout.WEST);		bottomPanel.add(downloadDOOverviewPanel, BorderLayout.CENTER);		splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, topPanel,				bottomPanel);		splitPane.setBorder(null);		add(splitPane, BorderLayout.CENTER);		SortButtonRenderer renderer2 = new SortButtonRenderer();		int n = model.getColumnCount();		for (int i = 0; i < n; i++) {			model.getColumn(i).setHeaderRenderer(renderer2);		}		header.addMouseListener(new SortMouseAdapter(header, renderer2));		header.addMouseListener(new HeaderPopupListener());		header.addMouseMotionListener(new MouseMotionAdapter() {			public void mouseDragged(MouseEvent e) {				PositionManager pm = PositionManagerImpl.getInstance();				TableColumnModel columnModel = downloadTable.getColumnModel();				for (int i = 0; i < columns.length; i++) {					try {						pm.setDownloadColumnIndex(i, columnModel								.getColumnIndex(columns[i].getIdentifier()));					} catch (IllegalArgumentException niaE) {						;						//nix zu tun					}				}			}		});		downloadTable				.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);	}