data table

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
JohnSColeman
Posts: 3
Joined: Tue Oct 24, 2006 12:32 pm

data table

Post by JohnSColeman » Tue Oct 24, 2006 12:40 pm

I'd like to display a table of data under my chart which is not based on the dataseries.

I've tried to use the ChartPanel and set a layout manager like Border or Box, and add a JTable component, but I can't seem to get the table to display.

It seems the ChartPanel does not work like a regular JPanel. Any ideas how to get the table to show please?

John

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Tue Oct 24, 2006 1:40 pm

Have you tried something like this yet?

Code: Select all

JPanel pnl = new JPanel();
pnl.add(chartPanel, BorderLayout.CENTER);
pnl.add(randomTable, BorderLayout.SOUTH);

Locked