Here you can find the source of formatRect(Rectangle rc)
public static String formatRect(Rectangle rc)
//package com.java2s; //License from project: Open Source License import java.awt.Rectangle; public class Main { public static String formatRect(Rectangle rc) { return Integer.toString(rc.x) + "," + Integer.toString(rc.y) + "," + Integer.toString(rc.width) + "," + Integer.toString(rc.height); }/*from w w w . java2 s. c o m*/ }