Here you can find the source of rectangleToString(Rectangle r)
public static String rectangleToString(Rectangle r)
//package com.java2s; //License from project: Open Source License import java.awt.Rectangle; public class Main { public static String rectangleToString(Rectangle r) { return r.x + "," + r.y + "," + r.width + "," + r.height; }//from w ww . j ava 2 s. c o m }