From c7c00f4fb757c0559218fd87eb1dda95acf8a1a3 Mon Sep 17 00:00:00 2001 From: Keiji Ariyama Date: Thu, 1 Mar 2012 17:43:50 +0900 Subject: Using the same directory as loaded png file path. Change-Id: I7bbba4491e6ebb7379b141dc85bdbdf3fc71d1e6 --- draw9patch/src/com/android/draw9patch/ui/ImageEditorPanel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draw9patch/src/com/android/draw9patch/ui/ImageEditorPanel.java b/draw9patch/src/com/android/draw9patch/ui/ImageEditorPanel.java index e0aa026..234cd88 100644 --- a/draw9patch/src/com/android/draw9patch/ui/ImageEditorPanel.java +++ b/draw9patch/src/com/android/draw9patch/ui/ImageEditorPanel.java @@ -353,7 +353,8 @@ class ImageEditorPanel extends JPanel { if (is9Patch) { return new File(name); } else { - JFileChooser chooser = new JFileChooser(); + JFileChooser chooser = new JFileChooser( + name.substring(0, name.lastIndexOf(File.separatorChar))); chooser.setFileFilter(new PngFileFilter()); int choice = chooser.showSaveDialog(this); if (choice == JFileChooser.APPROVE_OPTION) { -- cgit v1.1