private static void saveImage(JFrame f){
    	
    	BufferedImage img = new BufferedImage(f.getContentPane().getWidth(),f.getContentPane().getHeight(),BufferedImage.TYPE_INT_RGB);
		
    	Graphics g = img.getGraphics();
    	f.getContentPane().printAll(g);
    	
    	try {
    		FTPConfig config = FTPConfig.LoadConfig();
    		System.out.println(config);
			ImageIO.write(img,"png", new File("items.png"));
			FTPClient ftp = new FTPClient();
			ftp.connect(config.getServer());
			int reply = ftp.getReplyCode();
			if (!FTPReply.isPositiveCompletion(reply)) {
				ftp.disconnect();
				System.out.println("nope");
				//throw new Exception("Exception in connecting to FTP Server");
			}
			ftp.login(config.getUserName(), config.getPassword());
			ftp.setFileType(FTP.BINARY_FILE_TYPE);
			InputStream input = new FileInputStream(new File("items.png"));
			ftp.storeFile(config.getDirectory() + "items.png", input);
			ftp.logout();
			ftp.disconnect();
			
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    	
    }