< prev index next >

src/demo/share/jfc/J2Ddemo/java2d/DemoPanel.java

Print this page

        

*** 62,72 **** setLayout(new BorderLayout()); try { if (obj instanceof String) { className = (String) obj; ! obj = Class.forName(className).newInstance(); } if (obj instanceof Component) { add((Component) obj); } if (obj instanceof Surface) { --- 62,72 ---- setLayout(new BorderLayout()); try { if (obj instanceof String) { className = (String) obj; ! obj = Class.forName(className).getDeclaredConstructor().newInstance(); } if (obj instanceof Component) { add((Component) obj); } if (obj instanceof Surface) {
< prev index next >