<p>I can't directly add ChartFrame object to my Jframe object with .add(Component) method. And it's not possible to cast from ChartFrame to JComponent. Casting ChartFrame to Component from java.awt library is also impossible. </p>

<p>How can I add ChartFrame to JFrame the other way?</p>

That would mean inserting a JFrame within another JFrame.
A possible solution would be to use a
JDesktopPane
```
```
JDesktopPane desktop = ...
JFrame frame = ...

frame.setContentPane(desktop);

JInternalFrame internalFrame = ...
desktop.add(internalFrame);
```
```