1 Replies - 543 Views - Last Post: 19 May 2014 - 12:33 AM Rate Topic: -----

#1 kosmro   User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 63
  • Joined: 07-March 12

JFrame won't hide when new Applet starts

Posted 18 May 2014 - 09:47 PM

This may seem a little ambiguous, however I am trying to complete a small detail in my code which for the life of me, can't figure out!

I have a login window, which when sucessful will activate a new Applet/JFrame. The problem is that the login window remains in the background under the new JFrame. I want this to diappear. I want to either set the visibility to false, or close it. But I don't understand how to do this.

This is how the new window is started:
                DBAccess dba = new DBAccess();
                dba.setFname(fnameusr); //fnameusr
                dba.setLname(lnameusr); //lnameusr
                JOptionPane.showMessageDialog(null, "Your credentials were not entered correctly or you may not be authorised to access this system.");

Anyone have any ideas on how I could do this?


Is This A Good Question/Topic? 0
  • +

Replies To: JFrame won't hide when new Applet starts

#2 g00se   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3550
  • View blog
  • Posts: 16,190
  • Joined: 20-September 08

Re: JFrame won't hide when new Applet starts

Posted 19 May 2014 - 12:33 AM

A CardLayout is best for what you want to do - particularly in an applet:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1