public TeamProfile(Team tempTeam)
    {
        //Set team equal to param in object
        team = tempTeam;

        //Initialize objects
        txtComments.setText(team.stats.getComments());

        /***************SETUP TABLE**************/
        //Pull data for table into a 2D array
        Object [] columnNames = {"#", "Team", "GP","WINS","PTS",
            "Miss", "Top", "Mid", "Low", "Sh %",
            "Bump", "Pen", "Def", "S Bal",
            "C Bal", "D Bal", "Brkdwns", "pt/match"};
        Object [][] data = new Object [1][18];

        //Copy in data for team
        int index = Team.getTeamIndex(team.getTeamNumber());    //Gets team's index for table stats import
        data[0] = Team.teamList.get(index).stats.statsArray(index);
        System.out.println(data[0].length);

        //Create new table
        table = new JTable(data, columnNames);
        table.setBackground(new Color(255, 248, 180));
        table.setPreferredScrollableViewportSize(new Dimension(680, 100));
        table.setFillsViewportHeight(true);
        table.setRowSelectionAllowed(false);

        //Set column and row sizes
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        int [] sizes = {30, 50, 40, 40, 30, 45, 45, 45, 45, 55, 40, 40, 35, 45, 45, 45, 50, 50};
        HomeScreen.setColumnWidths(table, sizes);

        //Adding components to the frame
        this.add(chkBox);
        this.add(table);
        this.add(table.getTableHeader());
        this.add(txtComments);
    	this.add(cmdSaveComments);
    	this.add(cmdBack);
    	this.add(cmdHelp);
        this.add(lblTeamNameHeader);
        this.add(lblTeamName);
        this.add(lblNumber);
        this.add(lblDriveHeader);
        this.add(lblShapeHeader);
        this.add(lblLauncherHeader);
        this.add(lblDrive);
        this.add(lblShape);
        this.add(lblLauncher);
        this.add(cmdTeamName);
        this.add(cmdDrive);
        this.add(cmdShape);
        this.add(cmdLauncher);
        this.add(lblPicture);
        this.add(lblBackground);
        this.add(cmdDelete);

    	//Setting the frame colour
    	getContentPane().setBackground(Color.white);

        //Naming the button
        cmdSaveComments.setActionCommand("SAVE COMMENTS");
        cmdBack.setActionCommand("BACK");
        cmdHelp.setActionCommand("HELP");
        cmdTeamName.setActionCommand("TEAMNAME");
        cmdDrive.setActionCommand("DRIVE");
        cmdShape.setActionCommand("SHAPE");
        cmdLauncher.setActionCommand("LAUNCHER");
        cmdDelete.setActionCommand("DELETE");
        chkBox.setActionCommand("OMIT");

    	//Add the action listener and mouse listener
    	cmdSaveComments.addActionListener(this);
    	cmdBack.addActionListener(this);
    	cmdHelp.addActionListener(this);
        cmdTeamName.addActionListener(this);
        cmdDrive.addActionListener(this);
        cmdShape.addActionListener(this);
        cmdLauncher.addActionListener(this);
        cmdDelete.addActionListener(this);
        chkBox.addActionListener(this);

    	//Setting the layout for the frame
    	this.getContentPane().setLayout(layout);

    	//Set the components positions
        GUIHelper.setLocation(chkBox, layout, this.getContentPane(), 340, 580);
        GUIHelper.setLocation(cmdDelete, layout, this.getContentPane(), 320, 600);
        GUIHelper.setLocation(cmdSaveComments, layout, this.getContentPane(), 62, 521);
        GUIHelper.setLocation(txtComments, layout, this.getContentPane(), 255, 492);
        GUIHelper.setLocation(cmdBack, layout, this.getContentPane(), 9, 603);
        GUIHelper.setLocation(cmdHelp, layout, this.getContentPane(), 733, 603);
        GUIHelper.setLocation(lblNumber, layout, this.getContentPane(), 460, 62);
        GUIHelper.setLocation(lblTeamNameHeader, layout, this.getContentPane(), 350, 165);
        GUIHelper.setLocation(lblTeamName, layout, this.getContentPane(), 420, 185);
        GUIHelper.setLocation(cmdTeamName, layout, this.getContentPane(), 738, 170);
        GUIHelper.setLocation(lblDriveHeader, layout, this.getContentPane(), 350, 230);
        GUIHelper.setLocation(lblDrive, layout, this.getContentPane(), 420, 250);
        GUIHelper.setLocation(cmdDrive, layout, this.getContentPane(), 738, 235);
        GUIHelper.setLocation(lblShapeHeader, layout, this.getContentPane(), 350, 295);
        GUIHelper.setLocation(lblShape, layout, this.getContentPane(), 420, 315);
        GUIHelper.setLocation(cmdShape, layout, this.getContentPane(), 738, 300);
        GUIHelper.setLocation(lblLauncherHeader, layout, this.getContentPane(), 350, 360);
        GUIHelper.setLocation(lblLauncher, layout, this.getContentPane(), 420, 380);
        GUIHelper.setLocation(cmdLauncher, layout, this.getContentPane(), 738, 364);
        GUIHelper.setLocation(lblPicture, layout, this.getContentPane(), 49, 67);
        GUIHelper.setLocation(lblBackground, layout, this.getContentPane(), 0, 0);
        GUIHelper.setLocation(table.getTableHeader(), layout, this.getContentPane(), 47, 428);
        GUIHelper.setLocation(table, layout, this.getContentPane(), 47, 444);

        //Hide borders and panes around command buttons
        GUIHelper.setupButton(cmdSaveComments, 160, 25, false, false);
        GUIHelper.setupButton(cmdTeamName, 76, 24, false, false);
        GUIHelper.setupButton(cmdDrive, 76, 24, false, false);
        GUIHelper.setupButton(cmdShape, 76, 24, false, false);
        GUIHelper.setupButton(cmdLauncher, 76, 24, false, false);
        GUIHelper.setupButton(cmdBack, 105, 35, false, false);
        GUIHelper.setupButton(cmdHelp, 105, 35, false, false);
        GUIHelper.setupButton(cmdDelete, 200, 35, false, false);
        GUIHelper.setupSelector(chkBox, false, false);

        //Creating a font object
        Font big = new Font("Comic Sans MS", Font.BOLD, 30);
        Font impact = new Font("Charlemagne Std", Font.BOLD, 15);
        Font curly = new Font("Times New Roman", Font.ITALIC, 12);

        //Format comments text area
        txtComments.setPreferredSize(new Dimension(559, 58));
        txtComments.setBackground(new Color(255, 247, 255));

        //Adding team photo
        robotPhoto = new ImageIcon("src/Robot Photos/" + team.getTeamNumber() + ".jpg");
        robotPhoto.setImage(robotPhoto.getImage().getScaledInstance(257, 337, 1));
        lblPicture.setIcon(robotPhoto);

        //Changing fonts of labels
        lblTeamNameHeader.setFont(impact);
        lblShapeHeader.setFont(impact);
        lblLauncherHeader.setFont(impact);
        lblDriveHeader.setFont(impact);
        lblNumber.setFont(big);
        lblTeamName.setFont(curly);
        lblShape.setFont(curly);
        lblDrive.setFont(curly);
        lblLauncher.setFont(curly);

        //Loading team info
        lblNumber.setText(Integer.toString(team.getTeamNumber()));
        if(!team.getTeamName().equals("null"))
            lblTeamName.setText(team.getTeamName());
        if(!team.getDriveType().equals("null"))
            lblDrive.setText(team.getDriveType());
        if(!team.getRobotShape().equals("null"))
            lblShape.setText(team.getRobotShape());
        if(!team.getLauncherType().equals("null"))
            lblLauncher.setText(team.getLauncherType());

        //Checks if checkbox is selected
        if(!team.getShowInTable())
                chkBox.setSelected(true);

        //Set up the main frame
        this.setUndecorated(false);
        this.setSize(860,680);
        this.setResizable(false);
        setLocationRelativeTo(null);
        this.setTitle("ReboundScout | " + team.getTeamNumber());
        this.setVisible(true);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
    }//End of constructor method