File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes GUI building help please!!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "GUI building help please!!!!!" Watch "GUI building help please!!!!!" New topic

GUI building help please!!!!!

m dawg

Joined: Nov 05, 2001
Posts: 7

I have a JFrame that is 800 X 600. Ok in this JFrame i have a JMenuBar. On the JMenuBar i have a Menu called modes. In this i have two modes one is a runmode and the other will allow the user to build so it is a build mode. My problem is creating these JPanels in the JFrame. But, i don't want them to be on at the same time. Say if one is clicked the other will go away but no lose any data and the other will appear. These JPanels will be about 500X500. I can't get it to show up. I do have the buildmode as a class and the same as the runmode. I really need help if anyone can help me. PLEASE!!! Some sample code could get me going this is what i have so far. I know there are problems please help. I can't get anything. I also have the actionPerformed ready to go with no code in it so that it will go to different frames. Oh yea, there should be a main because the objects on the main screen needs to stay because the diffent thing about the build mode it that it draws a grid where you place objects but it will have some buttons too. Please help thanks

private JPanel buildmode, runmode;
private Dimension bmDim;
private Dimension rmDim;
public GizmoBallGUI() {
Container contentPane = getContentPane();
buildmode = new JPanel();
buildmode.setLayout(new BorderLayout());
bmDim = new Dimension();
bmDim.setSize(500, 500);
buildmode.add(BorderLayout.CENTER, bmDim);
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
I already answered this in the Swing/Awt forum. Please do not cross post in multiple forums.
I agree. Here's the link:
subject: GUI building help please!!!!!
It's not a secret anymore!