// Opens dialog to get options public static boolean connect(Frame parent, RpcConnection rpcConn) { DbConnectDialog cd = new DbConnectDialog(parent, rpcConn, true); try { if (cd.tryConnect()) return true; } catch (MsfException mex) { // on error connecting, show dialog } cd.setVisible(true); return cd.success; }