Skip to content

Commit

Permalink
update sample for Java 1.5 (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo authored Jan 26, 2020
1 parent cda53da commit 3f5c996
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/nu/xom/samples/TreeViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* </p>
*
* @author Elliotte Rusty Harold
* @version 1.0
* @version 1.3.3
*
*/
public class TreeViewer {
Expand Down Expand Up @@ -82,13 +82,11 @@ public static void display(Document doc) {
f.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
}
else {
// JFrame.EXIT_ON_CLOSE == 3 but this named constant is not
// available in Java 1.2
f.setDefaultCloseOperation(3);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
f.getContentPane().add(treeView);
f.pack();
f.show();
f.setVisible(true);

}

Expand Down

0 comments on commit 3f5c996

Please sign in to comment.