Sunday
May 26, 2013

Homework Help: Java

Posted by Robert on Tuesday, December 15, 2009 at 11:04am.

Write a GUI application that prompts the user for a number between 1 and 5. Be sure to include error checking so that the program continues to prompt the user for a number until the user's entry is between 1 and 5, inclusive.

Once a valid number is entered, the program should display a grid of horizontal and vertical lines inside the frame.
These lines should be drawn such that:

• The lines create x number of horizontal and x number of vertical boxes, where x is the number entered by the user.

• Each box should be 100 pixels by 100 pixels.

• The grid is spaced inside the frame such that it is perfectly centered both horizontally and vertically, with a 10-pixel border between the edge of the frame and the grid.

I cannot figure out how to make a border with the gridlayout. Please help!

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

java - Write a java application that finds the smallest of several integers. ...
Java - You are to create an efficient OO application to be used by the wait ...
Computer Science - Design a GUI java application which dsipalys data of an array...
Computer Language Java - What is the concept of multi-threading in java and how ...
programming - write a java application to calculate the exponent value of a ...
Computer Science - Consider the following application files: /JavaCS1/src/...
programming - creat a logic for a program that continuously prompts the user for...
Programming in c++ - Write a program in c++ that inputs a number [1-12] from the...
java - can anyone help me with this? I'm new to java! Write a program that ...
computer science - Write an application that calculates the value of e^x by ...

For Further Reading

Search
Members
Community