X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FSource%2FPackageEditor%2Fsrc%2Forg%2Ftianocore%2Fpackaging%2FUpdateLibraryClass.java;h=4bd6a136300a2d49ac4cb81cc3c1a0e4998ed18c;hp=8e796d48f142c859b1b3b2eb718645a36cba8b70;hb=24dba7f3c138af82b9cc7de2e77dddef46d75741;hpb=9a7cf04ab4bdfd59df8d08d8663e3a9747922d84 diff --git a/Tools/Source/PackageEditor/src/org/tianocore/packaging/UpdateLibraryClass.java b/Tools/Source/PackageEditor/src/org/tianocore/packaging/UpdateLibraryClass.java index 8e796d48f1..4bd6a13630 100644 --- a/Tools/Source/PackageEditor/src/org/tianocore/packaging/UpdateLibraryClass.java +++ b/Tools/Source/PackageEditor/src/org/tianocore/packaging/UpdateLibraryClass.java @@ -24,6 +24,8 @@ import javax.swing.table.*; import org.tianocore.common.Tools; +import java.awt.Dimension; +import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.*; @@ -88,6 +90,23 @@ public class UpdateLibraryClass extends JFrame implements ActionListener { this.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); this.setTitle("Update Library Class Declarations"); this.setContentPane(getJContentPane()); + this.centerWindow(); + } + /** + Start the window at the center of screen + + **/ + protected void centerWindow(int intWidth, int intHeight) { + Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); + this.setLocation((d.width - intWidth) / 2, (d.height - intHeight) / 2); + } + + /** + Start the window at the center of screen + + **/ + protected void centerWindow() { + centerWindow(this.getSize().width, this.getSize().height); } /**