private void initUI()
	{
		buttonPanel = new JPanel();
		
		buttonLayout = new GridLayout(bRowNum, bColNum, 5, 5);
		buttonPanel.setLayout(buttonLayout);
		
		SetUpButtons();
		menu.setPreferredSize(new Dimension(SCREEN_WIDTH, (int)(SCREEN_HEIGHT * 0.03)));
		SetUpMenuButtons();
		
		mainPanel.add(scrollPanel, BorderLayout.WEST);
		mainPanel.add(buttonPanel, BorderLayout.EAST);
		mainPanel.add(menu, BorderLayout.NORTH);	
		
		mainPanel.getInputMap().put(KeyStroke.getKeyStroke("D"), "Delete");
		mainPanel.getActionMap().put("Delete", new AbstractAction() {
			@Override
			public void actionPerformed(ActionEvent evt) {
				if(drwpnl.getDeleteMode())
				drwpnl.setDeleteMode(false);
			else
				drwpnl.setDeleteMode(true);
			}
			
		});
		
		mainPanel.getInputMap().put(KeyStroke.getKeyStroke("S"), "Hide");
		mainPanel.getActionMap().put("Hide", new AbstractAction() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				hideButtons = !hideButtons;
				int tempWidth = buttonPanel.getWidth();
				if (hideButtons) {
					scrollPanel.setPreferredSize(new Dimension(tempWidth + scrollPanel.getWidth(), scrollPanel.getHeight()));
					buttonPanel.setVisible(false);
					menu.hide.setText("Show buttons");
				}
				else {
					scrollPanel.setPreferredSize(new Dimension(scrollPanel.getWidth() - tempWidth, scrollPanel.getHeight()));
					buttonPanel.setVisible(true);
					menu.hide.setText("Hide buttons");
				}
				repaint();
			}
		});
		
    	
		if (loadedLevelName == null)
			setTitle("New Level");
		else
			setTitle(loadedLevelName);
		//setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
		setSize(SCREEN_WIDTH, SCREEN_WIDTH);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setLocationRelativeTo(null);
		add(mainPanel);
		
		pack();
		repaint();
	}