java equivalent of the following c# code

Printable View