Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    7
    Views
    1,196

    Re: Need some help with this JFrame, or JDialog.

    I described that in post #2:


    JFrame frame2 = new JFrame(); // Create second JFrame

    After the instance of JFrame is created, the code needs to add components to it and call the setVisible()...
  2. Replies
    7
    Views
    1,196

    Re: Need some help with this JFrame, or JDialog.

    The new statement is used to create an instance of a class.
  3. Replies
    7
    Views
    1,196

    Re: Need some help with this JFrame, or JDialog.

    That code does NOT create a JFrame. It looks like a constuctor for a class that was created somewhere else.
    A class instance/object is created by a new statement. Somewhere there is a call to new...
  4. Replies
    7
    Views
    1,196

    Re: Need some help with this JFrame, or JDialog.

    Use the new statement:

    frame1 = new JFrame();
    frame2 = new JFrame(); // Create second JFrame
Results 1 to 4 of 4