Java examples for 2D Graphics:Rectangle
are Rectangle Equal
//package com.java2s; import java.awt.Rectangle; public class Main { public static boolean areEqual(Rectangle a, Rectangle b) { if (a == null && b == null) { return true; } else if (a != null && b == null) { return false; } else if (a == null && b != null) { return false; } else {/* ww w . j av a 2 s .c o m*/ return a.equals(b); } } }