Hey everyone, thanks for reading.

Basically, I am using the netbeans GUI developer, and when I add a button on a jframe (We will call this JFrame1), I have the button create an object of type JFrame, called JFrame2.

Now, JFrame2 contains a loading bar with updated progress information on what the application is doing.

If I create a JFrame2 Object from a simple viewer, or in itself

Like:

public static void main(String args[])
{
     JFrame2 frame = new JFrame2();
}

This works fine, however, when I try this:

//This code is located inside of JFrame1.java

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) 
{
     JFRame2 frame = new JFrame2();
     this.setVisible(false);
}

This causes a new JFrame2 to be built, however the components on the JFrame2 (Buttons, progressbar, etc.) do not display.

Thanks! Please respond, I will appreciate it a lot! :(

Did you set your JFrame2's visibility to true?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.