X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosIgniteUI.java;h=076d99b209d537ded052eaf6257ca6c982e87705;hp=806b87b9d4e9fcdb60d7eb27a1d4e6c508461b52;hb=675ccd41e3b668cd4e1d2dd282dd317a00d00151;hpb=f3985ef8bc69bcec13ce155567a8ed7c5c6051cb diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index 806b87b9..076d99b2 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -28,9 +28,10 @@ import java.util.*; import java.text.*; import java.util.prefs.*; import java.util.concurrent.*; +import org.altusmetrum.AltosLib.*; public class AltosIgniteUI - extends JDialog + extends AltosDialog implements ActionListener { AltosDevice device; @@ -122,8 +123,7 @@ public class AltosIgniteUI void ignite_exception(Exception e) { if (e instanceof FileNotFoundException) { JOptionPane.showMessageDialog(owner, - String.format("Cannot open device \"%s\"", - device.toShortString()), + ((FileNotFoundException) e).getMessage(), "Cannot open target device", JOptionPane.ERROR_MESSAGE); } else if (e instanceof AltosSerialInUseException) { @@ -341,8 +341,8 @@ public class AltosIgniteUI c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.CENTER; c.insets = i; - c.weightx = 1; - c.weighty = 1; + c.weightx = 0; + c.weighty = 0; c.gridx = 0; c.gridy = 0; @@ -412,7 +412,6 @@ public class AltosIgniteUI close.addActionListener(this); close.setActionCommand("close"); - pack(); setLocationRelativeTo(owner);