The flash operation may be abandoned before it even starts; this makes
sure the UI doesn't flash up on the screen.
Signed-off-by: Keith Packard <keithp@keithp.com>
int flash_addr = image.address;
int image_start = 0;
+ action("start", 0);
action(0, image.data.length);
while (remain > 0 && !aborted) {
int this_time = remain;
} else {
String cmd = e.getActionCommand();
if (cmd.equals("done"))
- dispose();
- else {
+ ;
+ else if (cmd.equals("start")) {
+ setVisible(true);
+ } else {
pbar.setValue(e.getID());
pbar.setString(cmd);
}
"Cannot open image",
file.toString(),
JOptionPane.ERROR_MESSAGE);
- return;
} catch (IOException e) {
JOptionPane.showMessageDialog(frame,
e.getMessage(),
file.toString(),
JOptionPane.ERROR_MESSAGE);
- return;
} catch (InterruptedException ie) {
}
+ dispose();
}
public void abort() {