posted 22 years ago
Hi,
I've never done this before but gave it a shot & here's what I came up with -
1. Extend JPanel
2. setPreferredSize() to whatever & not setSize()
3. override paintComponent making sure that you first call the super class method
4. Plot your points in the paintComponent method - remember that (0,0) is on the upper left hand side & you'll have to transform your co-ordinate space so that (0,0) is on the lower left hand side
5. Put an instance of your JPanel subclass in a JScrollPane & add it to some container
I don't know if this is right way to do it but hope it'll get you started. Also try a google search on JFreeChart & you won't have to bother with this.
Ashish Hareet