Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Java JFrames

  • 04-05-2009 7:05pm
    #1
    Registered Users, Registered Users 2 Posts: 302 ✭✭


    Hi, I am new to JFrames and would like some general advice. If I want to have a Login JFrame and a DoStuff JFrame, how do I get them to communicate. In the Login frame, I have a username, password, another text field and commit & quit JButtons, with an actionlistner added to the buttons. On the second frame I want to display the username and the contents of the other text field (basically a number of items of data from frame1). When the user commits on the login frame, I want to display the second frame which includes the data that was entered in the first, plus more enterable fields, and commit & quit JButtons.
    1) How many classes should I have, i.e. should I have a class per frame and a controlling class, and a class to represent the data, e.g. a pojo. What clases should implement the listeners.
    2) What listeners should I have for the 2 sets of buttons and how do I communicate betweens the frames, how do both frames reference the pojo.
    I am asking thes questions so that I can build a multi-frame application to a reasoble pattern.
    Any help appreciated.


Advertisement