Hi i need to write a program that asks the user for the length and width of a rectangle, and must print the rectangle using *'s .... for example a width of 5 and length of 7

* * * * * * *
* *
* *
* *
* *
* *
* * * * * * * ...


i have the program all set,,, but the right side does not print properly, unless i put 5x7 for the width and length... other values print incorrect......
here is my code:

/*

import java.io.*;

public class Class1
{
public static void main(String[] args) throws IOException
{

BufferedReader IN= new BufferedReader(new InputStreamReader(System.in));
System.out.print(" what is the width >");
int width=Integer.parseInt(IN.readLine());

System.out.print(" what is the length >");
int length=Integer.parseInt(IN.readLine());

if(width<=0)
{
System.out.print(" Invalid amount!");
}
else if(length<=0)
{
System.out.print(" Invalid amount!");
}


System.out.println();
System.out.println();

//top length of rectangle
int count=0;
while(length>count)
{

System.out.print(" * ");
count+=1;
}
//left side
count=1;
int next=0;
System.out.println();
int length2=(length*2)+2;
while(width>count)
{
System.out.print(" *");
//right=length*2)
while(length2>next)
{
System.out.print(" ");

next+=1;

}
System.out.print(" *");
System.out.println();
count+=1;
next=0;
}


// bottom
count=0;
while(length>count)
{

System.out.print(" * ");
count+=1;
}


System.in.read();
}


}

*/