Title: Java jGrasp - JTree and JEditorPane (part 1)
Duration: 15:16 min
Description: In this video we will build a JTree. The frame is composed of two sections: left (BorderLayout.WEST) and center (BorderLayout.CENTER). The left section contains a tree of categories (news, sports, and technology). The user will be able to expend and collapse the tree. Every category contains three subcategories. The center section contains an editor pane that displays web sites. When the user selects a leaf node from the tree, the associated site will be displayed in the center pane. The center pane is a JEditorPane, which supports HTML to some degree.
Methodology: Good coding standards and simplified design.
Technologies: Abstract Window Toolkit, Java Swing.
Examples constructed: created an example that shows a tree of options on the left side of the frame, and a pane in the center. When the user selects an element from the tree, the associated web site is displayed in the center pane.
ey words: AWT, Swing, JFrame, DefaultMutableTreeNode, JEditorPane, JTree, JPanel, EventQueue, Runnable, TreeSelectionListener, TreePath, Hashtable.