Jump to content

Close a window?

- - - - -

  • Please log in to reply
3 replies to this topic

#1
GoldBot

GoldBot

    Newbie

  • Members
  • Pip
  • 2 posts
Right i have login.java, and after you have logged in i wana go to Auth.java

ive used this code


 JOptionPane.showMessageDialog(null, "Welcome, you can use the program ...", "Welcome", JOptionPane.WARNING_MESSAGE);

                 new Auth().setVisible(true);

                    System.exit(0);


but it just closes all windows open, if i remove system.exit(0);

it will open auth but keep login open?:/

#2
Vladimir

Vladimir

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
You have to hide login window:

Quote

setVisible(false); // or login.setVisible(false);
System.exit terminates Java Virtual Machine, typically you should not call it manually.

#3
eafkuor

eafkuor

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 218 posts
Window.dispose();


#4
aditbalkam

aditbalkam

    Newbie

  • Members
  • Pip
  • 1 posts

eafkuor said:

Window.dispose();
or maybe this:
this.dispose();

===============================================================
Visit My Blog: http://www.aditbalkam.co.cc




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users