protected void updateGraph(FunctionGraph someGraph, String title) { if (someGraph.getParent() == null) { JFrame jf = someGraph.showInJFrame(title, 400, 250, false, false); setDependentWindowLocation(jf); } else { JFrame jf = (JFrame) SwingUtilities.getWindowAncestor(someGraph); jf.setTitle(title); jf.setVisible(true); // just to be sure someGraph.repaint(); } } }
protected void updateGraph(FunctionGraph someGraph, String title) { if (someGraph.getParent() == null) { JFrame jf = someGraph.showInJFrame(title, 400, 250, false, false); setDependentWindowLocation(jf); } else { JFrame jf = (JFrame) SwingUtilities.getWindowAncestor(someGraph); jf.setTitle(title); jf.setVisible(true); // just to be sure someGraph.repaint(); } } }