public MainPanel(int width, int height){
		inventoryG = new InventoryGrid(this);
		mainSort = new SortPanel(inventoryG);
		
		setSize(width, height);
		
		//Setup favorites button
        favoritesButton.setBounds(monitorWidth - 100, 0, 100, 30);
        favoritesButton.addActionListener(new ActionListener(){
			@Override
			public void actionPerformed(ActionEvent arg0) {
				Launcher.showFavorites();
			}
        });
        this.add(favoritesButton, JLayeredPane.DRAG_LAYER);
        
        //Set up components right side of split pane
        setupRightPanel();
        
          
        
        inventoryScroll = new JScrollPane(inventoryG);
        leftSplit.setLayout(new BorderLayout());
        leftSplit.add(mainSort, BorderLayout.NORTH);

        
       
        inventoryScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        
        //add(mainSort);
        //mainSort.setBounds(0, 0, (int)(getWidth() * mainSplitPercent) - 20, 20);
      
        leftSplit.add(inventoryScroll);
        setLeftSplitSizes();
        
        
        //Setup split pane
        splitPane.add(leftSplit);
        splitPane.add(rightSplit);
        splitPane.setBounds(0, 0, this.getWidth(), this.getHeight() - 50);
        splitPane.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, new PropertyChangeListener() {

			@Override
			public void propertyChange(PropertyChangeEvent arg0) {
				//HERE IS WHERE PANELS ARE RESIZED ACCORDING TO SPLITPANE
				leftSplit.setSize(monitorWidth - (monitorWidth - splitPane.getDividerLocation()), monitorHeight);
				setRightSplitSizes();
				rightSplit.setSize(monitorWidth - splitPane.getDividerLocation(), monitorHeight);
				
				setLeftSplitSizes();
				setRightSplitSizes();
				
				mainSort.setSize(splitPane.getDividerLocation() - 18, 10);
			}

			
        });
        splitPane.setOneTouchExpandable(true);
        splitPane.setDividerLocation(monitorWidth * mainSplitPercent / monitorWidth);
        
        this.add(splitPane, JLayeredPane.DEFAULT_LAYER);
	}