.Hi Everybody, I need the answer for this question in Java and I need the progra
ID: 3666286 • Letter: #
Question
.Hi Everybody, I need the answer for this question in Java and I need the program to run in the eclipse.the Text book for the solution of 13.11 is Java how to Program (Early Objects) 10th Edition Question. Create an application that provIdes a solution for problem 13.11 by modifying the solution as follows. Provide a 5 x 5 grid instead of 8 x 8 Make all other necessary modifications necessary to run the application. .
This is the problem to 13.11 that you requested
Question
(Grid Using Method drawLine) Write an application that draws an 8-by-8 grid. Use Graphics method drawLine.
Explanation / Answer
import java.applet.Applet;
public class line extends Applet
{
public void paint(Graphics g)
{
int i;
for (i=1; i<=9; i++)
{
g.drawLine(30,i*20,270,i*20);
//for (i=1; i<=9; i++)
g.drawLine(i*30,20,i*30,180);
}
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.