Lab #4
The purpose of this lab is to demonstrate the usage of the SWING component JTree in the design of event driven programs that utilize a Tree data structure.

The program consists of the folowing:
  • Design the structure of the NBA (National Basketball Association) teams using a JTree component
  • The program is a Java application program
  • The frame is a JFrame with two panels. The top panel contains a TextArea where the tree is displayed. The bottom panel consists of a panel with a text field where the wins and losses of the team in focus are displayed. Focus means that the name of the team is clicked by the mouse.
  • The numbers of wins and losses are determined from a random method in your program (they are not real wins and losses).
  • The tree is as folows:
    • The root of the Tree is: National Basketball Association
    • Expanding National Basketball Association gives you the children:
      • Western Conference
      • Eastern Conference
    • Expanding Western Conference node gives you the children:
      • Pacific Division Teams
      • Midwest Division Teams
    • Expanding the Eastern Conference node gives you the children:
      • Atlantic Division Teams
      • Central Division Teams
    • Expanding Pacific Division Teams gives you the children:
      • Golden State Warriors
      • Los Angeles Lakers
      • Phoenix Suns
      • Portland Trail Blazers
      • Sacramento Kings
      • Seatle Supersonics
    • Expanding the Midwest Division Teams node gives you the children:
      • Dallas Mavericks
      • Denver Nuggets
      • Houston Rockets
      • Minnesota Timberwolves
      • San Antonio Spurs
      • Utah Jazz
      • Vancouver Grizzlies
    • Expanding the Atlantic Division Teams node gives you the children:
      • Boston Celtics
      • Miami Heat
      • New Jersey Nets
      • New York Knicks
      • Orlando Magic
      • Philadelphia 76ers
      • Washington Wizzards
    • Expanding the Central Division Teams node gives you the children:
      • Atlanta Hawks
      • Charlotte Hornets
      • Chicago Bulls
      • Cleveland Cavaliers
      • Detroit Pistons
    • There should be at least a vertical scrollbar in the text area.
    • There should be a menu component with File label. The File menu has one item labeled "Exit". Clicking on this menu item terminates the program