/**
 * Package contains all the views required by budgetreporter
 */
package com.budgetreporter.View;

import java.awt.Container;

import javax.swing.*; 

/**
 * @author jacky
 *
 */
public class LoginView extends JPanel{
	
	public LoginView(){
        //Create and set up the panel.
		super();
		initUI();
	}
	
	public void initUI(){
        this.setLayout(null);

        //Add the "login" label
        JLabel loginLabel = new JLabel("Login");
        loginLabel.setBounds(0, 0, 100, 20);
        
        //Add the "Username" label
        JLabel usernameLabel = new JLabel("Username: ");
        usernameLabel.setBounds(0, 40, 100, 20);

        //Add the "Username" Textfield
        JTextField usernameTextField = new JTextField();
        usernameTextField.setEditable(true);
        usernameTextField.setBounds(100, 40, 100, 20);
        
        //Add the "password" label
        JLabel passwordLabel = new JLabel("Password: ");
        passwordLabel.setBounds(0, 60, 100, 20);
        
        //Add the "password" Textfield
        JTextField passwordTextField = new JTextField();
        passwordTextField.setEditable(true);
        passwordTextField.setBounds(100, 60, 100, 20);

        //Add the "login" button
        JButton loginButton = new JButton("Login");
        loginButton.setBounds(180, 100, 100, 30);
        
        this.add(loginLabel);
        this.add(usernameLabel);
        this.add(usernameTextField);
        this.add(passwordLabel);
        this.add(passwordTextField);
        this.add(loginButton);
        
        System.out.println("Login page created");		
	}
}

@@ -122,16 +122,44 @@
 ntainer;
+%0Aimport java.awt.GridLayout;
 %0A%0Aimport
@@ -245,16 +245,228 @@
 anel%7B%0A%09%0A
+%09private JLabel m_loginLabel;%0A%09private JLabel m_usernameLabel;%0A%09private JTextField m_usernameTextField;%0A%09private JLabel m_passwordLabel;%0A%09private JTextField m_passwordTextField;%0A%09private JButton m_loginButton;%0A%09%0A
 %09public 
@@ -572,47 +572,82 @@
 ()%7B%0A
-        this.setLayout(null);%0A%0A        
+%09%09GridLayout gLayout = new GridLayout(0,1);%0A%09%09this.setLayout(gLayout);%0A%0A%09%09
 //Ad
@@ -674,23 +674,18 @@
         
-JLabel 
+m_
 loginLab
@@ -714,61 +714,134 @@
 %22);%0A
-        loginLabel.setBounds(0, 0, 100, 20);%0A        
+%09%09%0A%09%09JPanel innerPanel = new JPanel();%0A%09%09GridLayout innerLayout = new GridLayout(0,2);%0A%09%09innerPanel.setLayout(innerLayout);%0A%09%09
 %0A   
@@ -880,23 +880,18 @@
         
-JLabel 
+m_
 username
@@ -928,58 +928,8 @@
 %22);%0A
-        usernameLabel.setBounds(0, 40, 100, 20);%0A%0A
     
@@ -971,27 +971,18 @@
         
-JTextField 
+m_
 username
@@ -1011,32 +1011,34 @@
 ield();%0A        
+m_
 usernameTextFiel
@@ -1062,72 +1062,8 @@
 e);%0A
-        usernameTextField.setBounds(100, 40, 100, 20);%0A        %0A
     
@@ -1101,23 +1101,18 @@
         
-JLabel 
+m_
 password
@@ -1149,66 +1149,8 @@
 %22);%0A
-        passwordLabel.setBounds(0, 60, 100, 20);%0A        %0A
     
@@ -1192,27 +1192,18 @@
         
-JTextField 
+m_
 password
@@ -1232,32 +1232,34 @@
 ield();%0A        
+m_
 passwordTextFiel
@@ -1283,64 +1283,8 @@
 e);%0A
-        passwordTextField.setBounds(100, 60, 100, 20);%0A%0A
     
@@ -1320,24 +1320,18 @@
         
-JButton 
+m_
 loginBut
@@ -1370,106 +1370,81 @@
     
-loginButton.setBounds(180, 100, 100, 30);%0A        %0A        this.add(loginLabel);%0A        this
+%0A        //Adding components to inner container%0A        innerPanel
 .add(
+m_
 user
@@ -1463,25 +1463,33 @@
         
-this
+innerPanel
 .add(
+m_
 username
@@ -1504,33 +1504,41 @@
 d);%0A        
-this
+innerPanel
 .add(
+m_
 passwordLabe
@@ -1549,25 +1549,33 @@
         
-this
+innerPanel
 .add(
+m_
 password
@@ -1598,17 +1598,138 @@
     
-this.add(
+%0A        // Adding components to outer container%0A        this.add(m_loginLabel);%0A        this.add(innerPanel);%0A        this.add(m_
 logi

Change layout of the login view