Is it possible to add maximize/minimize button to the JDialog? if not then can we add these buttons to JPanel?
I have a JPanel and inside that panel there is a JDialog.I want to add a minimize/maximize button such that when that button is clicked JDialog and the components under JDialog get adjusted according to the JPanel. like when i click maximize then jpanel should get enlarged and components inside that panel(JDialog) also get enlarged and vice versa for minimize button. The solution I got from here is for JPanel inside a JFrame. But my JPanel is standalone only.
Is it possible to add maximize/minimize button to the JDialog?
JDialog.setUndecorated
and add required Windows decoration back, notice resources for JDialog/JWindow came from Native OS, valid for SystemLookAndFeel
only and could be CrossPlatfor
m sensitiveif not then can we add these buttons to JPanel?
JOptionPane
and with modified contents, there you can put any JComponents
and/with returns value tooJDialog
: No.
JPanel
: Yes, simply use JButtons
setting the JFrame#setMaximizedState
value, in the listeners, but not on JDialog
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With