public void loadGame(String name) { try { name = name.concat(".save"); FileInputStream fileIn = new FileInputStream(name); ObjectInputStream in = new ObjectInputStream(fileIn); theTab = null; theTab = (Tabuleiro) in.readObject(); in.close(); fileIn.close(); } catch (IOException i) { JOptionPane.showMessageDialog( window.getFrame(), "File not Found !", "IOException not found", JOptionPane.ERROR_MESSAGE); i.printStackTrace(); return; } catch (ClassNotFoundException c) { JOptionPane.showMessageDialog( window.getFrame(), "File is not valid !", "ClassNotFoundException", JOptionPane.ERROR_MESSAGE); c.printStackTrace(); return; } theTab.printLayout(); window.updateDrawbleContent(); }
protected void init_JDialog() { Settings_Dialog d1 = new Settings_Dialog(window.getFrame(), this); d1.setVisible(true); }