public void setMainFrame(JFrame f){
		mainFrame =f;
		mainFrame.addComponentListener(new ComponentAdapter() {
		    public void componentResized(ComponentEvent e) {
		        for(int i=0;i<imgIcons.size();i++){
		        	imgIcons.set(i, new ImageIcon(imgIcons.get(i).getImage().getScaledInstance(buttons[0].getWidth(), buttons[0].getHeight(), java.awt.Image.SCALE_SMOOTH)));
		        }          
		    }
		});
		mainFrame.addKeyListener(this);
		mainFrame.setFocusable(true);
		mainFrame.setFocusTraversalKeysEnabled(false);
	}