Question: **How to run the program in maximum size in java ,so that it shows the restore button also, without using** 
Toolkit t=Toolkit.getDefaultToolkit(); 
**as it doesn't show RestoreDown Button**

Answer: 
```
frame.pack();
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
frame.setVisible(true);

```
If by "run the program in maximum size" you mean open a `JFrame` maximized, then try something like this:

```
setExtendedState(getExtendedState() | Frame.MAXIMIZED_BOTH);

```

See: <https://docs.oracle.com/javase/8/docs/api/java/awt/Frame.html#setExtendedState-int->