private void onPause() {
        if (!downloadsTable.getSelectionModel().isSelectionEmpty()) {
            int id = downloadsTable.convertRowIndexToModel(downloadsTable.getSelectedRow());
            Integer gid = (Integer) downloadsTable.getModel().getValueAt(id, 0);
            downloadManager.pauseDownload(gid);
        }
    }