OSDN Git Service

ADD: To fron the confirm window.
[mdc/BetaProject.git] / src / org / jent / checksmtp / ToListUI.java
index 5a7f475..d4ae3f4 100644 (file)
@@ -7,6 +7,7 @@
 package org.jent.checksmtp;
 
 import java.awt.Dimension;
+import java.awt.Point;
 import java.awt.Toolkit;
 import java.util.List;
 
@@ -34,6 +35,7 @@ public class ToListUI extends javax.swing.JFrame {
       jList1.setVisible(true);
     }
     this.setVisible(true);
+    toFront(); //from Tiger... setAlwaysOnTop(true);
     
     Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
     //If exsist configuration file, iconise at start up.
@@ -172,8 +174,9 @@ public class ToListUI extends javax.swing.JFrame {
   }//GEN-LAST:event_jButtonOKActionPerformed
   
   private boolean restorePosition() {
-    int x = this.getX();  //TODO: get real potition on screen.
-    int y = this.getY();
+    Point locationPoint = getLocationOnScreen();  //TODO: IllegalComponentStateException
+    int x = locationPoint.x;
+    int y = locationPoint.y;
     int h = this.getHeight();
     int w = this.getWidth();
     boolean modified = false;