/* * (non-Javadoc) * * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */ public void actionPerformed(ActionEvent e) { FileReader fr = null; try { DigitalCircuit cir; fr = new FileReader("temp-cir.xml"); cir = (DigitalCircuit) st.fromXML(fr); DigitalWindow win = new DigitalWindow(); // create a new window DrawingPad pad = win.getDrawingPad(); pad.setCircuit(cir); MDIWindow.addWindow(win); win.show(); fr.close(); } catch (FileNotFoundException e1) { e1.printStackTrace(); } catch (IOException e1) { e1.printStackTrace(); } catch (Exception e1) { try { fr.close(); } catch (IOException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } } }