From: jprocter Date: Wed, 14 Apr 2010 14:39:33 +0000 (+0000) Subject: dialog box appears in centre of desktop window X-Git-Tag: Release_2_5~72 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=35c939fcdbf7438c61e8e3e696e5b40fd710a245;p=jalview.git dialog box appears in centre of desktop window --- diff --git a/src/jalview/gui/FeatureColourChooser.java b/src/jalview/gui/FeatureColourChooser.java index 24662c7..1e26a3a 100644 --- a/src/jalview/gui/FeatureColourChooser.java +++ b/src/jalview/gui/FeatureColourChooser.java @@ -72,7 +72,9 @@ public class FeatureColourChooser extends JPanel this.type = type; ap = fr.ap; frame = new JDialog(Desktop.instance,true); - frame.setSize(480,185); + frame.setTitle("Graduated Feature Colour for "+type); + Rectangle deskr = Desktop.instance.getBounds(); + frame.setBounds(new Rectangle((int) (deskr.getCenterX()-240),(int) (deskr.getCenterY()-92),480,185)); frame.setContentPane(this); //frame.setLayer(JLayeredPane.PALETTE_LAYER); //Desktop.addInternalFrame(frame, "Graduated Feature Colour for "+type, 480, 145);