In most cases, the look and modal windows (for example, JDialog ) do not have a maximize button, simply because they should not be maximized (or minimized) at all.
Itβs possible to add a maximise button with some tricks, but it will be completely against how JDialog should work. If you need a maximize button, the best solution would be to use JWindow or JFrame instead of JDialog . These windows support maximization and minimization.
WARNING: You must not do this, no matter what.
The trick for this in JDialog :
setUndecorated(true); getRootPane().setWindowDecorationStyle(JRootPane.FRAME);
Colin hebert
source share