Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 12th, 2005, 01:21 AM
Registered User
 
Join Date: Jun 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default GridLayout and Panels

I have 3 panels within a frame and I want to make sure that I can size all the panels so that the relevant fields can be seen by the user. Can someone look at my code below and tell me where I'm going wrong.

Thanks

        this.setLayout(new GridLayout(3,1));

        topPanel = new Panel();
        topPanel.add(new Label("Welcome to the OU TMA03 System"));
        topPanel.add(new Label("Messages :"));
        topPanel.add(messageLabel);
        topPanel.add(registerButton);
        topPanel.add(loginButton);
        add(topPanel);

        middlePanel = new Panel();
        middlePanel.setBounds(700,300,200,200);
        middlePanel.add(new Label("Please enter your details to register with the system"));
        middlePanel.add(new Label("Full Name:"));
        middlePanel.add(fullName);
        middlePanel.add(new Label("Address:"));
        middlePanel.add(userAddress);
        middlePanel.add(new Label("Telephone Number:"));
        middlePanel.add(userTelephone);
        middlePanel.add(new Label("Login ID:"));
        middlePanel.add(userLogin);
        middlePanel.add(new Label("User Password:"));
        middlePanel.add(userPassword);
        middlePanel.add(new Label("Confirm Password:"));
        middlePanel.add(userConfirm);
        middlePanel.add(submitRegister);
        middlePanel.add(exitRegister);
        middlePanel.add(registerMessage);
        add(middlePanel);
        middlePanel.setVisible(false);


        bottomPanel = new Panel();
        bottomPanel.add(new Label("Please enter your details to login"));
        bottomPanel.add(new Label("User Name:"));
        bottomPanel.add(userName);
        bottomPanel.add(new Label("Password:"));
        bottomPanel.add(logPassword);
        bottomPanel.add(submitLogin);
        bottomPanel.add(exitLogin);
        bottomPanel.add(loginMessage);
        add(bottomPanel);
        bottomPanel.setVisible(false);






Similar Threads
Thread Thread Starter Forum Replies Last Post
Panels and defaultbuttons Sensei_D ASP.NET 2.0 Basics 8 July 12th, 2007 08:46 AM
Raised Panels HotBlue Visual Basic 2005 Basics 0 October 20th, 2006 03:42 PM
GridLayout :: help needed kanoorani Java Basics 2 January 22nd, 2006 01:02 PM
Is GridLayout Mode gone in VS2005? Aaron Edwards ASP.NET 2.0 Basics 1 January 2nd, 2006 04:22 AM
GridLayout problem thanasis_gr Java GUI 2 December 1st, 2004 02:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.