tuned GUI;
authorwenzelm
Tue, 29 Sep 2015 16:58:33 +0200
changeset 61280 12f9ab87a06d
parent 61279 8410015c3e82
child 61281 11c1bf92d61d
tuned GUI;
src/Pure/GUI/system_dialog.scala
--- a/src/Pure/GUI/system_dialog.scala	Tue Sep 29 16:45:54 2015 +0200
+++ b/src/Pure/GUI/system_dialog.scala	Tue Sep 29 16:58:33 2015 +0200
@@ -7,7 +7,6 @@
 package isabelle
 
 
-import java.awt.{GraphicsEnvironment, Point}
 import java.awt.event.{WindowEvent, WindowAdapter}
 import javax.swing.{WindowConstants, JFrame, JDialog}
 import java.io.{File => JFile, BufferedReader, InputStreamReader}
@@ -36,10 +35,7 @@
         _window = Some(window)
 
         window.pack()
-        val point = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint()
-        window.setLocation(
-          new Point(point.x - window.getWidth / 2, point.y - window.getHeight / 2))
-
+        window.setLocationRelativeTo(owner)
         window.setVisible(true)
 
         window