X-Git-Url: http://git.osdn.net/view?p=importpicture%2Fimportpicture.git;a=blobdiff_plain;f=src%2Fosm%2Fjp%2Fgpx%2Fmatchtime%2Fgui%2Frestamp%2FDialogCorectTime.java;h=e026cceb86e3172d1c7d6430cda0f680e9779da7;hp=67fe18749ee33d8e689a1b3ad7c9df62a8772e55;hb=2556cbc06393e5000e9fae9579f759354540dbd4;hpb=f4d64b483462bf5905b0bae69f8baabafa585b3a diff --git a/src/osm/jp/gpx/matchtime/gui/restamp/DialogCorectTime.java b/src/osm/jp/gpx/matchtime/gui/restamp/DialogCorectTime.java index 67fe187..e026cce 100644 --- a/src/osm/jp/gpx/matchtime/gui/restamp/DialogCorectTime.java +++ b/src/osm/jp/gpx/matchtime/gui/restamp/DialogCorectTime.java @@ -154,16 +154,21 @@ public class DialogCorectTime extends JDialog implements PanelAction { */ @SuppressWarnings("UseSpecificCatch") public void imageView_Action() { - String path = basetime.getImageFile().getImageFile().getAbsolutePath(); + try { + String path = basetime.getImageFile().getImageFile().getAbsolutePath(); - // View Image File - int size_x = imageSPane.getWidth() - 8; - ImageIcon tmpIcon = new ImageIcon(path); - refImage = tmpIcon; - if (tmpIcon.getIconWidth() > size_x) { - refImage = new ImageIcon(tmpIcon.getImage().getScaledInstance(size_x, -1, Image.SCALE_DEFAULT)); + // View Image File + int size_x = imageSPane.getWidth() - 8; + ImageIcon tmpIcon = new ImageIcon(path); + refImage = tmpIcon; + if (tmpIcon.getIconWidth() > size_x) { + refImage = new ImageIcon(tmpIcon.getImage().getScaledInstance(size_x, -1, Image.SCALE_DEFAULT)); + } + imageLabel.setIcon(refImage); + } + catch(NullPointerException e) { + // 何もしない } - imageLabel.setIcon(refImage); repaint(); }