Re: Java frames
On Jan 25, 9:05 pm, Big - Goofy <vada...@hotmail.com> wrote:
Thanks for your reply .
Your future lack of top-posting, will be thanks enough.
(rest of top-post corrected).
On 24 Jan 2007 19:05:29 -0800, "Andrew Thompson"
On Jan 25, 1:23 pm, Big - Goofy <vada...@hotmail.com> wrote:
..
I have done a game (a scrabble game) and the way I did it is in two
frames!
Do you mean java.awt.Frame, javax.swing.JFame,..
...everything is in Swing JFrame JMenuBar
JInternalFrame !
...
...One for the menu and one for the game. SO when you click on
new Game then is opening another frame! The thing is that now I did a
menubar ..
....
...so I want to call somehow the frame of the game in the current
frame or otherwise I would like to do the same thing in an
InternalFrame ..
...
OK. I am still a little confused as to why you have
two JFrame's at all.
Why not have..
- a single JFrame with a single JMenuBar and a
blank 'playfield' area below that.
- When the users selects New Game from the menu,
either add the game (coded in a JPanel) into the
'playfield' area, or clear it to a 'new game' (if it
is already there).
The JPanel for the game could be ..
- Added once to the JFrame, as it is created,
but left in a 'blank' state to start with.
- Added to a java.awt.CardLayout (which would
allow the user to have multiple games going at once,
once you figure a way to allow them to switch
between current games.
- Added to a JTabbedPane (much the same deal
as the CardLayout)
Andrew T.