From: amwaterhouse Date: Tue, 6 Feb 2007 15:51:07 +0000 (+0000) Subject: Allow for frame insets X-Git-Tag: Release_2_3~368 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bad9b1c3e957e44c2fa5ad3a0717ea2a40c1bc12;p=jalview.git Allow for frame insets --- diff --git a/src/jalview/appletgui/EditNameDialog.java b/src/jalview/appletgui/EditNameDialog.java index b80aca7..56dcbc3 100644 --- a/src/jalview/appletgui/EditNameDialog.java +++ b/src/jalview/appletgui/EditNameDialog.java @@ -55,11 +55,15 @@ public class EditNameDialog extends Dialog implements ActionListener description = new TextField(desc, 40); Panel panel = new Panel(new BorderLayout()); Panel panel2 = new Panel(new BorderLayout()); - panel2.add(new Label(label1), BorderLayout.WEST); + Label label = new Label(label1); + label.setFont(new Font("Monospaced",Font.PLAIN, 12)); + panel2.add(label, BorderLayout.WEST); panel2.add(id, BorderLayout.CENTER); panel.add(panel2, BorderLayout.NORTH); panel2 = new Panel(new BorderLayout()); - panel2.add(new Label(label2), BorderLayout.WEST); + label = new Label(label2); + label.setFont(new Font("Monospaced",Font.PLAIN, 12)); + panel2.add(label, BorderLayout.WEST); panel2.add(description, BorderLayout.CENTER); panel.add(panel2, BorderLayout.CENTER); @@ -74,13 +78,22 @@ public class EditNameDialog extends Dialog implements ActionListener add(panel, BorderLayout.NORTH); + + int width = 500, height=100; + + pack(); + + height+=getInsets().top+getInsets().bottom; + setBounds(ap.alignFrame.getBounds().x - + (ap.alignFrame.getSize().width - 500) / 2, + + (ap.alignFrame.getSize().width - width) / 2, ap.alignFrame.getBounds().y - + (ap.alignFrame.getSize().height - 120) / 2, - 500, 130); + + (ap.alignFrame.getSize().height - height) / 2, + width, height); show(); + + } public void actionPerformed(ActionEvent evt)