@Override
	public void run(){
		ResourceMonitorFrame frame = new ResourceMonitorFrame();
		frame.setAlwaysOnTop( this.frameAlwaysOnTop );

		String max, tot, free;
		String maxP = "-max heap size %15d MB";
		String totP = "-total memory  %15d MB";
		String freeP = "-free heap     %15d KB";

        int k = 1024;
        int m = k * k;
		while( true ) {
			max = String.format( maxP, (Runtime.getRuntime().maxMemory() / m) );
			tot = String.format( totP, (Runtime.getRuntime().totalMemory() / m) );
			free = String.format( freeP, (Runtime.getRuntime().freeMemory() / k) );

			frame.pnl.update( max, tot, free );
			try {
				if(frame.isVisible())
					Thread.sleep( sleepTime );
				else break;
			} catch(InterruptedException e) {}
		}
	}