public SortPanel(InventoryGrid ig){
		setOpaque(true);
		
		this.ig = ig;
		
		catMenu.addMouseListener(new MouseListener(){

			@Override
			public void mouseClicked(MouseEvent arg0) {
				
				if(catMenu.isPopupMenuVisible() && catTrueVisible){
					catMenu.setPopupMenuVisible(false);
					catTrueVisible = false;
				}
				
			}
			@Override
			public void mouseEntered(MouseEvent arg0) {	}
			@Override
			public void mouseExited(MouseEvent arg0) {	}
			@Override
			public void mousePressed(MouseEvent arg0) {	}
			@Override
			public void mouseReleased(MouseEvent arg0) {}
			
		});
		
		sortMenu.addMouseListener(new MouseListener(){

			@Override
			public void mouseClicked(MouseEvent arg0) {
				
				if(sortMenu.isPopupMenuVisible() && sortTrueVisible){
					sortMenu.setPopupMenuVisible(false);
					sortTrueVisible = false;
				}
				
			}
			@Override
			public void mouseEntered(MouseEvent arg0) {	}
			@Override
			public void mouseExited(MouseEvent arg0) {	}
			@Override
			public void mousePressed(MouseEvent arg0) {	}
			@Override
			public void mouseReleased(MouseEvent arg0) {}
			
		});
		
		catMenu.add(allCheck);
		allCheck.addActionListener(new CatClick());
		allCheck.setSelected(true);
		
		catMenu.add(apparelCheck);
		apparelCheck.addActionListener(new CatClick());
		catMenu.add(helmetCheck);
		helmetCheck.addActionListener(new CatClick());
		catMenu.add(torsoCheck);
		torsoCheck.addActionListener(new CatClick());
		catMenu.add(gauntletsCheck);
		gauntletsCheck.addActionListener(new CatClick());
		catMenu.add(bootsCheck);
		bootsCheck.addActionListener(new CatClick());
		catMenu.add(shieldsCheck);
		shieldsCheck.addActionListener(new CatClick());
		catMenu.add(ringsCheck);
		ringsCheck.addActionListener(new CatClick());
		catMenu.add(amuletsCheck);
		amuletsCheck.addActionListener(new CatClick());
		
		catMenu.add(weaponsCheck);
		weaponsCheck.addActionListener(new CatClick());
		catMenu.add(oneSwordCheck);
		oneSwordCheck.addActionListener(new CatClick());
		catMenu.add(twoSwordCheck);
		twoSwordCheck.addActionListener(new CatClick());
		catMenu.add(axeCheck);
		axeCheck.addActionListener(new CatClick());
		catMenu.add(bowsCheck);
		bowsCheck.addActionListener(new CatClick());
		catMenu.add(hammersCheck);
		hammersCheck.addActionListener(new CatClick());
		catMenu.add(macesCheck);
		macesCheck.addActionListener(new CatClick());
		
		catMenu.add(potionsCheck);
		potionsCheck.addActionListener(new CatClick());
		catMenu.add(poisonCheck);
		poisonCheck.addActionListener(new CatClick());
		catMenu.add(restoreCheck);
		restoreCheck.addActionListener(new CatClick());
		catMenu.add(fortifyCheck);
		fortifyCheck.addActionListener(new CatClick());
		
		catMenu.add(foodCheck);
		foodCheck.addActionListener(new CatClick());
		catMenu.add(booksCheck);
		booksCheck.addActionListener(new CatClick());
		catMenu.setBorder(BorderFactory.createLineBorder(Color.black));
		
		//Sort Buttons
		sortMenu.add(costCheck);
		costCheck.addActionListener(new SortClick());
		sortMenu.add(damageCheck);
		damageCheck.addActionListener(new SortClick());
		sortMenu.add(armorCheck);
		armorCheck.addActionListener(new SortClick());
		sortMenu.add(weightCheck);
		weightCheck.addActionListener(new SortClick());
		sortMenu.add(statucCheck);
		statucCheck.addActionListener(new SortClick());
		
		
		sortMenu.setBorder(BorderFactory.createLineBorder(Color.black));
		
		setBackground(Color.orange);
		
		catMenuBar.add(catMenu);
		
		catMenuBar.add(sortMenu);
		
		add(catMenuBar);
		
		//catLabel.setBounds(25, 0, headerWidth, headerHeight);
		catMenu.setBounds(headerWidth, 0, headerWidth + 10, headerHeight);
		//sortLabel.setBounds(headerWidth * 2 + 30, 0, headerWidth, headerHeight);
		sortMenu.setBounds(headerWidth * 3, 0, headerWidth + 10, headerHeight);
		
		catMenu.setPopupMenuVisible(true);
		sort();
	}