1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lostsunrise [7]
4 years ago
9

The following program draws squares recursively. Fill in the missing code. import javax.swing\.\*; import java.awt\.\*; public c

lass Test extends JApplet { public Test() { add(new SquarePanel()); } static class SquarePanel extends JPanel { public void paintComponent(Graphics g) { super.paintComponent(g); int width = (int)(Math.min(getWidth(), getHeight()) * 0.4); int centerx = getWidth() / 2; int centery = getHeight() / 2; displaySquares(g, width, centerx, centery); } private static void displaySquares(Graphics g, int width, int centerx, int centery) { if (width >= 20) { g.drawRect(centerx - width, centery - width, 2* width, 2 * width); displaySquares(________, width - 20, centerx, centery); } } } }
Computers and Technology
1 answer:
ExtremeBDS [4]4 years ago
8 0

Answer:

The missing code to this question is g.

Explanation:

In this question firstly import packages. Then declaration of the class Test that inherits the JApplet. In this class, we declare the default constructor. In this constructor, we call the add function. Then we declare another class that is SquarePanel. This class inherits JPanel. In this class, we define a method that is paintComponent(). In this method, we define an integer variable. In this method, we perform calculations and pass it to another function that is displaySquares(). In this function, we pass the value as the arguments. So in question the missing code or argument is g.

You might be interested in
Which of the following are points that can demonstrate the accuracy of a website?
Ivahew [28]

websites that can backup their answers so the first one:) im just thinking logically.

3 0
3 years ago
Which type of text may be formatted to print at the bottom of every page?
Tatiana [17]
The answer is header.
3 0
3 years ago
Who loves you tube , anyone?
kodGreya [7K]

I LIKE IT DO YOU ALSO LOVE IIT

8 0
3 years ago
Read 2 more answers
What were the technological innovations that allowed for the rapid expansion of the railroads?
liraira [26]

Answer:

There are different phases of railroad expansion with the innovations in technology.

Explanation:

Few of the technological innovations are described below that leads in railroad expansion more rapid.

1. Centralized Traffic control (CTC) is introduced in 1960's that is used to control the traffic on railroads using different signal control.

2. In 1990's after computer technology involvement, railway ticket and reservation system is automate and being centralized. That makes the railroad expansion improve.

3. Bullet train technology has been introduced, that makes the railway trains more faster.

4. Electric trains has been introduced to use green energy and reduce the dependency on the fuel to make environment clean and green.

5 0
3 years ago
When it comes to collecting and organizing prospect and account​ information, salespeople have a large variety of computer syste
OleMash [197]

Answer:

sales force automation systems

Explanation:

Based on the information provided within the question it can be said that in this scenario these are known as sales force automation systems (SFA). This type of system or software is used in order to automate various business tasks, including managing contacts, order processing, sales, inventory, etc. Which is why it is mostly used by the salespeople.

4 0
3 years ago
Other questions:
  • What effect can camera tilt create? Do you think this is effective? Why or why not?
    13·1 answer
  • 13. You're expecting an important call from Mr. Suarez, a potential customer. While waiting for this call, your supervisor calls
    15·1 answer
  • What kind of game was pole position?
    6·2 answers
  • str1=”Good” str2=”Evening” Does the concatenation of the above two strings give back a new string or does it concatenate on the
    14·1 answer
  • Which of these is not one of the main parts of an email
    9·1 answer
  • The need to strike a<br>- among work, life, family, and other responsibilities is<br>universal.​
    15·1 answer
  • When you expect a reader of your message to be uninterested, unwilling, displeased, or hostile, you should Group of answer choic
    15·1 answer
  • Computer science - algorithms - flowcharts
    11·1 answer
  • which of the following protocols allows hosts to exchange messages to indicate problems with packet delivery?
    14·1 answer
  • Which tab do you open to access the Comments feature?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!