Drawing

From: CR (nospam_at_sneno.dk)
Date: 11/28/04


Date: Sun, 28 Nov 2004 10:52:11 +0100

I have a little problem with drawing in a JPanel. What I want to be able to
do is the following:

Setup an extended JPanel with the appropiate properties and then add it to
my frame and make visible (no problem here). Next I want to be able to call
a method of the extended JPanel from outside the panel that will take two
arrays as parameters and draw them using drawPolyline.

I can't seem to figure out how to do this. So far I have only been able to
draw to to a panel by adding to the paintComponent method, but this isn't
very flexible when I would like for the contents of the panel to change by
the press of a JButton for instance.

Hope you can help.