Can this java code be reduced?

Printable View