Replacing an existing jPanel with a new jPanel
- From: Brian <bcearl@xxxxxxxxx>
- Date: Mon, 10 Mar 2008 21:23:49 -0700 (PDT)
Hi everybody,
I'm working on a project and basically I've developed a swing GUI
using NetBeans Swing GUI builder. On one form, I have an existing
JPanel that contains no other components. Also on this form, I have a
button that when pressed executes a function of another Class that
creates a graph (using jFreeChart) and returns the graph on a JPanel.
My question is: Is it possible to replace the existing JPanel on the
aforementioned form with the JPanel returned from the graphing method
such that I can dynamically place the created graph on the form?
I'm not sure exactly how to go about doing this. I know that I can
take the JPanel containing the graph and show it on another frame by
creating and new frame and showing it. However my desire is to have
the graph be part of the existing form in the location where the
existing JPanel lies.
Any help would be very much appreciated.
Thanks.
Brian
.
- Follow-Ups:
- Re: Replacing an existing jPanel with a new jPanel
- From: Knute Johnson
- Re: Replacing an existing jPanel with a new jPanel
- From: Andrew Thompson
- Re: Replacing an existing jPanel with a new jPanel
- Prev by Date: Re: how to make GUI in java
- Next by Date: Re: Replacing an existing jPanel with a new jPanel
- Previous by thread: how to make GUI in java
- Next by thread: Re: Replacing an existing jPanel with a new jPanel
- Index(es):