dialog.setTitle("TS Client login: " + Configuration.getProperty("server.mode", "<unknown>"));
//dialog.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE);
Container content = dialog.getContentPane();
content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS));
content.add(Box.createRigidArea(new Dimension(0,10)));
JPanel panel = new JPanel(new DialogLayout());
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JLabel userNameLabel = new JLabel("User name:");
panel.add(userNameLabel);
userNameField.setColumns(10);