Please Help: Java and GUI

hello

I kindly ask you guys to help me with this small pblm:
I am making a simple database for a college using GUI (code written in java). My pblm is simply that I donot know how to make many JFrames and link them together. for example: the use enters some info to a jframe 1 and then he clicks next. I dont know how to do that in programming1 i read about parent and children jframes and am thinking of making different panels and setting them visible or not visible accordingly. may you help me in this issue??


thank you

Comments

  • : hello
    :
    : I kindly ask you guys to help me with this small pblm:
    : I am making a simple database for a college using GUI (code written in java). My pblm is simply that I donot know how to make many JFrames and link them together. for example: the use enters some info to a jframe 1 and then he clicks next. I dont know how to do that in programming1 i read about parent and children jframes and am thinking of making different panels and setting them visible or not visible accordingly. may you help me in this issue??
    :
    :
    : thank you
    :


    If you have a reference to any Object, you can make calls to methods on it. That is how you communicate with them. A JFrame is no exception.

    If your database is remote, maybe you could use a website to interface with it instead. If you could implement something in PHP or JSP that connects with the database, you could get around this trouble with swing components.


  • first of all thanks a lot for ur reply. Programming wise I know that the ActionEvent for clicking next is a call for a JFrame. My problem is actually that I don't know how to implement it in GUI; i.e. In the design part (am using btw netbeans 5.5) I don't know how to make multiple JFrames that I would make them call one another in the code. That is my problem. Please try to help me if u can.

    I am really sorry for taking your time and thank you a lot!

    Best Regards,

    Tolli

    : : hello
    : :
    : : I kindly ask you guys to help me with this small pblm:
    : : I am making a simple database for a college using GUI (code written in java). My pblm is simply that I donot know how to make many JFrames and link them together. for example: the use enters some info to a jframe 1 and then he clicks next. I dont know how to do that in programming1 i read about parent and children jframes and am thinking of making different panels and setting them visible or not visible accordingly. may you help me in this issue??
    : :
    : :
    : : thank you
    : :
    :
    :
    : If you have a reference to any Object, you can make calls to methods on it. That is how you communicate with them. A JFrame is no exception.
    :
    : If your database is remote, maybe you could use a website to interface with it instead. If you could implement something in PHP or JSP that connects with the database, you could get around this trouble with swing components.
    :
    :

  • You could make each frame a class and in the class you put a public method like this: -
    [code]
    public void DisplayForm() {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this form's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    }
    });
    }
    [/code]

    the createAndShowGUI() method would be the one into which you implement your form design (layout managers and all).

    About the main interface, i suggest you use a form with drop down menus and ActionListeners to implement the menus
  • thanks a lot and sorry for taking your time :) am gonna try this now :)


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories