teritori 0 Newbie Poster

hi everyone. I have a user interface with a login button(see attachment), The problem i'm having is:

1. When the login button is clicked, i want the frame to dispose.and another frame(timerframe) to be visible.
2.The login button has an actionlistener within it.
3.The login button also connects to a database.
4.Is a listener class a private or public class?- I'm having problem calling other external variables(components).

Please help!!