From f20781010a6560b7b359af269c502d098917c446 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 3 Jan 2013 17:31:01 -0800 Subject: micropeak: Add command line export option micropeak --export will create full of useful data. Signed-off-by: Keith Packard --- micropeak/MicroFileChooser.java | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'micropeak/MicroFileChooser.java') diff --git a/micropeak/MicroFileChooser.java b/micropeak/MicroFileChooser.java index d2540987..21ddb0f8 100644 --- a/micropeak/MicroFileChooser.java +++ b/micropeak/MicroFileChooser.java @@ -36,24 +36,12 @@ public class MicroFileChooser extends JFileChooser { return file; } - public InputStream runDialog() { + public File runDialog() { int ret; ret = showOpenDialog(frame); - if (ret == APPROVE_OPTION) { - file = getSelectedFile(); - if (file == null) - return null; - filename = file.getName(); - try { - return new FileInputStream(file); - } catch (FileNotFoundException fe) { - JOptionPane.showMessageDialog(frame, - fe.getMessage(), - "Cannot open file", - JOptionPane.ERROR_MESSAGE); - } - } + if (ret == APPROVE_OPTION) + return getSelectedFile(); return null; } -- cgit v1.2.3