Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 12th, 2005, 01:21 AM
Registered User
 
Join Date: Jun 2005
Location: , , .
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);

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:44 AM.


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