JDialog minimizing


I was wondering if the top level JDialog can have a minimize button ? I found how to do it for a JInternalFrame but I don't think I can use this as my top level window for the application (is this correct ?)

------ code----------
ABConsole m_console = new ABConsole();
------ end code------

where :

ABConsole is

------ code----------
public class ABConsole extends JDialog
------ end code------

what do I need to do to enable the "minimize" button in the title bar?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hi !
dont think u can make it using JDialog...
since it has been design to be in this way...
in order to fulfill ur requirement...
u can try using a normal frame or window to sinmulate as a dialog...:)

hope it helps...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
try this,

public class ABConsole extends javax.swing.JDialog {

    public ABConsole(java.awt.Frame parent, boolean modal) {
        super(parent, modal);

    private void initComponents() {
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {

    /** Closes the dialog */
    private void closeDialog(java.awt.event.WindowEvent evt) {

    * @param args the command line arguments
    public static void main(String args[]) {
     new ABConsole(new javax.swing.JFrame(), true).show();
tomschuring1Author Commented:
Hi Kotan, that just kills the whole dialog. I was looking for a minimize button.
tomschuring1Author Commented:
perhaps it is 'abusing' the JDialog functionality. I decided to go with a Frame instead. thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.