int x_width = 90;
int y_width = 30;
sess.requestPTY("dumb", x_width, y_width, 0, 0, null);
sess.startShell();
TerminalDialog td = new TerminalDialog(loginFrame, username + "@" + hostname, sess, x_width, y_width);
/* The following call blocks until the dialog has been closed */