Here you can find the source of firstSmallerThanSecond(java.awt.Rectangle first, java.awt.Rectangle second)
private static boolean firstSmallerThanSecond(java.awt.Rectangle first, java.awt.Rectangle second)
//package com.java2s; //License from project: Open Source License public class Main { private static boolean firstSmallerThanSecond(java.awt.Rectangle first, java.awt.Rectangle second) { int areaFirst = (int) (first.getSize().getHeight() * first.getSize().getWidth()); int areaSecond = (int) (second.getSize().getHeight() * second.getSize().getWidth()); return areaFirst < areaSecond; }/* ww w .ja v a 2s. co m*/ }