If I have a JFrame (with a JMenuBar, etc.) is there a way I could convert
it, somehow, such that it would run in a tab of a JTabbedPane? Could it be
(fairly easily) converted to, say, a JPanel? Or am I pretty much stuck
having to rewrite the entire thing?
Thanks, Ike
Steve W. Jackson - 23 Dec 2003 20:54 GMT
>:If I have a JFrame (with a JMenuBar, etc.) is there a way I could convert
>:it, somehow, such that it would run in a tab of a JTabbedPane? Could it be
>:(fairly easily) converted to, say, a JPanel? Or am I pretty much stuck
>:having to rewrite the entire thing?
>:
>:Thanks, Ike
Much depends on how you designed the contents. As you no doubt know,
what you put into a JFrame goes into its content pane. So it's that
stuff you should look into migrating onto a tabbed pane. As for a
JToolBar, there are special methods in JFrame for holding one, but it
can be used elsewhere. Where's this tabbed pane going to be? In some
kind of window (JDialog, JFrame, something similar descended from
Window). Perhaps the new parent could also help provide a home for the
menu bar in question.
= Steve =

Signature
Steve W. Jackson
Montgomery, Alabama
Jim Cobban - 26 Dec 2003 21:13 GMT
> If I have a JFrame (with a JMenuBar, etc.) is there a way I could convert
> it, somehow, such that it would run in a tab of a JTabbedPane? Could it be
> (fairly easily) converted to, say, a JPanel? Or am I pretty much stuck
> having to rewrite the entire thing?
If you need to retain the JMenuBar then you need to stick with one of the
classes which contains a JRootPane. JFrame is not appropriate because it
implements a window in the containing windowing system, and you just want it
displayed within the existing window containing the JTabbedPane. I haven't
tried this but you could try replacing the JFrame with a JDialog which
appears to me to be the simplest class containing a JRootPane.