Search code examples
javaswingjdialog

How to put maximize and minimize buttons in a jDialog?


my question is very simple. I am creating an app with Java swing, and i realized that the jDialogs doesn´t have maximize and minimize buttons, instead of the jFrame.

enter image description here

There is a way to add it to it? or if not, what can i do if i want to replace the jDialog to another swing component that it has?

Thanks a lot!


Solution

  • To answer my question, i have used the cardLayout to create differents jPanels and including into my jFrame, every time that i want to show another "window" i change it to the corresponding jPanel..

    You can see the documentation of cardLayout here:

    https://docs.oracle.com/javase/tutorial/uiswing/layout/card.html