public String paint()
	{
		long startTime = new Date().getTime();
		if (words.size() == 0)
		{
			return "No Keywords Found!";
		}
		
		for (int time = 0; time < img.length; time ++)
		{
			currentTime = time;
			//reset min_size for next frame
			min_size.x=0;
			min_size.y=0;
			g = img[time].createGraphics();
			g.setColor(Color.WHITE);
			g.fillRect(0, 0, width, height); // Fill the picture with white			
					
			// draw the existing ones
			for (int j = 0; j < current.size(); j++)
			{	
				//check for existence
				if (!current.get(j).exists(time))
				{
					current.remove(j);
					j--;
					continue;
				}
				
				try   // Set the font
				{
					font = fontBase.deriveFont(Font.PLAIN, current.get(j).getSize(time));
				} 
				catch (Exception ex)
				{
					ex.printStackTrace();
				}
				g.setFont(font);
				System.out.println(current.get(j).X()+" "+current.get(j).Y());
				// Set the color of the string which is related to its position
				setColor(new Point(current.get(j).X(), current.get(j).Y()));
				g.drawString(current.get(j).getLabel().getStr(), current.get(j).X(), current.get(j).Y());

			}	
			
//			if (update) observer.imageUpdate(img, ImageObserver.ALLBITS, 0, 0, width, height);
			
			System.out.println((time + 1 ) + " / " + Label.MAXCOUNT + ". Size: " + current.size());
			while(true)
			{
				if (paintStr() == 0) break;
			}		

			try   // Set the font
			{
				font = fontBase.deriveFont(Font.PLAIN, 10);
			} 
			catch (Exception ex)
			{
				ex.printStackTrace();
			}
			g.setFont(font);
			g.setColor(new Color(200,200,35));
			g.drawString(date[currentTime] + "", 20, 20);
		}

		System.out.println("Paint Successful!");   
		long endTime = new Date().getTime();
		done = true;
		return "Time used: " + (endTime - startTime) / 1000 + "." + (endTime - startTime) % 1000 + " s.";
	}