Evento menu em JTable

Boa tarde a todos.
O problema que estou tendo é o seguinte: no main de cada classe abaixo, há um JOptionPane que deverá exibir os dados carregados DEPOIS que o JDialog é fechado.

Na classe Login funciona, o resultado do login é exibido no JOptionPane depois de se realizar o login

Na classe TFase o JOptionPane é exibido junto com o JDialog, e não depois.

A minha intenção é criar um programa com várias JTables, uma por tela.
Ao se dar dois cliques em uma linha da JTable, o evento deverá abrir uma nova tela (ou setar um panel) com um JTable baseado na linha que foi clicada.
Eu não consigo imaginar uma forma de se fazer isto trocando de JPanel, então estou me utilizando de um JDialog para cada tela.
Alguém tem uma sugestão melhor?

eis os códigos:

import java.awt.*;
import java.awt.event.*;

import javax.swing.*;

import com.jgoodies.forms.layout.*;

public class Login {
	private JDialog dialog;
	private JPanel panel;
	private JTextField tfUsername;
	private JPasswordField pfPassword;
	private JButton btnOK;
	private String username;
	private String password;
	private User userLogged;
	private User userLogging;
	private DBLayer db = DBLayer.getInstance();

	public JPanel getPanel() {//monta a GUI
		CellConstraints cc = new CellConstraints();
		FormLayout layout = new FormLayout(
				//columns
				"pref:grow, " +
				"right:default, " +
				"2dlu, " +
				"default," +
				"2dlu, " +
				"default," +
				"pref:grow" ,
				//rows
				"fill:pref:grow, " +
				"default, " +
				"2dlu, " +
				"default, " +
				"2dlu, " +
				"fill:default, " +
				"fill:pref:grow"
		);
		panel = new JPanel(layout);
		Handler handler = new Handler();
		
		tfUsername = new JTextField(10);
		tfUsername.addActionListener(handler);
		tfUsername.addFocusListener(handler);
		
		pfPassword = new JPasswordField(10);
		pfPassword.addActionListener(handler);
		pfPassword.addFocusListener(handler);
		
		btnOK = new JButton("Ok");
		btnOK.addActionListener(handler);
		
		panel.add(new JLabel("Usuário"), cc.xy(2, 2));
		panel.add(tfUsername, cc.xy(4, 2));
		panel.add(new JLabel("Senha"), cc.xy(2, 4));
		panel.add(pfPassword, cc.xy(4, 4));
		panel.add(btnOK, cc.xy(6, 4, "right,center"));
		
		return panel;
	}
	
	public void setGUIAlertStatus(int i) {//Eventos na GUI
		switch (i) {
		case Constants.SENHA_INVALIDA:
			pfPassword.setText("");
			pfPassword.setBackground(new Color(255, 220, 220));
			break;
		case Constants.USUARIO_INEXISTENTE:
			int option = JOptionPane.showConfirmDialog(
					null,
					"<HTML><FONT COLOR = 'RED'>Usuário não cadastrado</FONT><BR>" +
							"&nbsp;&nbsp;&nbsp;&nbsp;Deseja cadastrar um novo usuário?</HTML>", 
					"Usuário não cadastrado", 
					JOptionPane.YES_NO_OPTION, 
					JOptionPane.QUESTION_MESSAGE,
					null);
			if(option == JOptionPane.YES_OPTION) {
				new CadastroUsuario(getUserLogging());
			}
			break;
		case Constants.ERRO_CAVERNOSO:
		default:
			tfUsername.setBackground(new Color(255, 220, 220));
			pfPassword.setBackground(new Color(255, 220, 220));
			break;
		}
	}
	
	public User getUserLogging() {//retorna o usuario na GUI
		username = tfUsername.getText();
		password = new String(pfPassword.getPassword());		
		return new User(username, password);		
	}
	
	public User getUserLogged() {//retorna o usuário logado
		dialog = new JDialog(new JFrame(), true);
		dialog.setTitle("Login");
		dialog.add(getPanel());
		dialog.pack();
		dialog.setLocationRelativeTo(null);
		dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);		
		dialog.setVisible(true);
		return userLogged;
	}
	
	public int getID() {
		return getUserLogged().getID();
	}
	
	private class Handler implements ActionListener, 
			FocusListener{//eventos	
		public void actionPerformed(ActionEvent e) {
			if(!tfUsername.getText().equals("")) {
				userLogging = getUserLogging();
				int status = db.getLoginStatus(userLogging);
				setGUIAlertStatus(status);
				if(status == Constants.USUARIO_CADASTRADO) {
					userLogged = db.login(userLogging);
					dialog.dispose();
				}
			}
		}
		
		public void focusGained(FocusEvent e) {
			focus();
		}
		
		public void focusLost(FocusEvent e) {
			focus();
		}
		
		public void focus() {
			pfPassword.setBackground(Color.WHITE);
			tfUsername.setBackground(Color.WHITE);
		}
	}
	
	public static void main(String[] args) {
		User u = new Login().getUserLogged();
		JOptionPane.showMessageDialog(null, u.getID());
	}
}

a outra classe, que não “funciona”

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;

public class TFase extends MyTable {
	private int id;
	private int scriptID;
	private JDialog dialog = new JDialog();
	
	public TFase(int id) {
		select = "SELECT f.* FROM " +
				"fase f INNER JOIN faseScript fs " +
				"ON f.id = fs.idFase " +
				"INNER JOIN script s " +
				"ON fs.idScript = s.id " +
				"WHERE s.id = " + scriptID;
		loadTable(select);
		
		MenuNovoHandler menuHandler = new MenuNovoHandler();
		addMenuAbrirEvent(menuHandler);
		
		addMenuNovoEvent(
			new ActionListener() {//Novo
				public void actionPerformed(ActionEvent e) {
					String s[] = new EditDialog().getData(Constants.FASE);
					db.executeQuery("INSERT INTO fase VALUES(NULL, '" + s[0] + "', '" + s[1] + "')",
							"EditLogin.getPanelErro.menu.addMenuNovoEvent()"
					);
					db.executeQuery("INSERT INTO faseScript VALUES" +
							"((SELECT MAX(id) FROM fase), " +
							scriptID + ")",
							"EditLogin.getPanelErro.menu.addMenuNovoEvent()"
					);
					model.setRows(db.getData(select));
					model.fireTableDataChanged();
				}
			}
		);
		
		addMenuEditarEvent(
			new ActionListener() {//Editar
				public void actionPerformed(ActionEvent e) {
					String s[] = new EditDialog().getData(Constants.FASE,  
							new String[]{model.getValueAt(getSelectedRow(), 1).toString(), 
							model.getValueAt(getSelectedRow(), 2).toString()}
					);
					db.executeQuery("UPDATE fase SET descr = '" + s[0] + "', obs = '" + s[1] + "' WHERE id = " + getID(),
							"EditLogin.getPanelErro.menu.addMenuNovoEvent()"
					);
					model.setRows(db.getData(select));
					model.fireTableDataChanged();
				}
			}
		);
		
		addMenuExcluirEvent(
				new ActionListener() {
					public void actionPerformed(ActionEvent e) {
					if (!db.isFull("SELECT * FROM atividadeFase WHERE idFase = " + getID())) {
						db.executeQuery("DELETE FROM faseScript WHERE idFase = " + getID() + " AND idScript = " + scriptID,
						"Fase.menu.addMenuExcluirEvent()");
						db.deleteRow("fase", getID());
						model.setRows(db.getData(select));
						model.fireTableDataChanged();
					} else {
						JOptionPane.showMessageDialog(null, "A tabela que você selecionou possui dados.\nExclua todos os seus dados antes de exclui-la");
					}
				}
			}
		);
	}
	
	public int getFaseID() {		
		dialog = new JDialog();
		dialog.add(new JScrollPane(this));
		dialog.setVisible(true);
		dialog.setLocationRelativeTo(null);
		dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		dialog.pack();
		return id;
	}
	
	private class MenuNovoHandler implements ActionListener {
		public void actionPerformed(ActionEvent e) {
			id = getID();
			dialog.dispose();			
		}
	}
	
	public static void main(String[] args) {
		JOptionPane.showMessageDialog(null, new TFase(0).getFaseID());
	}
}

Por favor opinem sobre o código.
Muito obrigado a todos!