public void createGUI(String text) {
final String release = text;
System.out.println(release);
Container contentPane = getContentPane();
contentPane.setBackground(Color.WHITE);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
this.setMinimumSize(getPreferredSize());
this.setResizable(false);
this.setVisible(true);
// um GUI zentriert anzuzeigen
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
int x = ((int)dim.getWidth()-300)/2;
int y = ((int)dim.getHeight()-300)/2;
this.setLocation(x, y);
this.namingAendern(release);
this.add(this.ueberschrift, BorderLayout.NORTH);
ueberschrift.setFont(new Font ("Bitte wählen Sie einen Server aus:"
,0,28));
this.add(this.ninjoIcon, BorderLayout.WEST);
this.panelServerGroup.setLayout(new GridLayout(0,1));
// this.panelServerGroup.setLayout(new BoxLayout(panelServerGroup,
// BoxLayout.Y_AXIS));
this.fillRadioBox(release);
this.panelServerGroup.setBackground(Color.WHITE);
this.add(this.panelServerGroup, BorderLayout.CENTER);
this.add(this.ok, BorderLayout.SOUTH);
ok.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
Process myProcess = null;
try {
// Versuch, NinJo zu starten
myProcess = Runtime.getRuntime().exec
("rundll32 url.dll,FileProtocolHandler " +
"D:\\NinJo\\release_"+release+
"\\client\\bin\\run_client.bat");
myProcess.waitFor();
// Fenster schließen
System.exit(0);
} catch (Exception ex) {
JOptionPane.showMessageDialog(
ServerAuswahlMenue.this, "FEHLER");
}
}
});
contentPane.add(this.panelServerGroup);
this.pack();
}