how to minimize jframe in java

Java
frame.setState(Frame.ICONIFIED);
Source

Also in Java: