I'm trying to be creative with a class project in Java.
I have a JFrame
which takes in some input from the user, and I want to create a sort of pop up frame that will show a graph from the input.
The second frame is only going to be showing a graph. I'm having trouble realizing this.
I'm using the GUI builder(Netbeans) for the main JFrame
and at first I tried to just create an empty JPanel
and set it visible from the button, but that didn't work and I soon found out I couldn't.
I had to use a JFrame
or some other container apparently(am I wrong?).
So now I'm thinking, how will I pass the information to the second pane for the graphing information?
Anyways, I'm just looking for some input or good practices in order to accomplish this. I'm reading up on CardLayout
now but that's not the solution I want since it would require me to create a pane to hold the graph component. I just want the graph button to open up a graph pane(or frame) and close when the user wants to. The main frame is only used to take the input for the graph. Thank you for any input.
There will be a question soon on how I can actually graph something in Java, but ill tackle one problem at a time