my $MamaGUI       = new MainWindow( -title => "Mein Programm"); # Größe des Fensters: my $windowHeight  = "600"; my $windowWidth   = "800"; # Bildschirmgröße holen: my $screenHeight  = $MamaGUI->screenheight; my $screenWidth   = $MamaGUI->screenwidth; # MamaGUI zentrieren: $MamaGUI->geometry($windowWidth."x".$windowHeight); $MamaGUI->geometry("+" .                    int($screenWidth/2 - $windowWidth/2) .                    "+" .                    int($screenHeight/2 - $windowHeight/2)                   );