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
The ____ keyword specifies that a function or method does not return a value.
dedylja [7]
The void keyword. Otherwise you use a type name, such as int or char or string.
4 0
3 years ago
When changing lanes on an expressway signal your intentions and?
valkas [14]
Check your mirrors and blind spots
4 0
4 years ago
The process of __________ encourages members to accept responsibility for the outcomes of a group and for changing the style in
soldier1979 [14.2K]

Answer:

The correct answer to the following question will be Option B (Interpersonal feedback).

Explanation:

  • Interpersonal feedback seems to be a mechanism under which someone talks. Individuals deliver a message regarding their sensations and expectations of actions by another.
  • It encourages employees to take obligation for a group's results and to change the look they correspond to many other people in.

Therefore, Interpersonal feedback is the right answer.

8 0
3 years ago
A general-use dimmer switch is required to be counted as ? where installed in a single-gang box on a circuit wired with 12 awg c
aleksandrvk [35]

Answer:

2 conductors.

Explanation:

A dimmer switch is an electrical switching or control device used to control the power or voltage to a compatible dimmer bulb.

It reduces the ambience if light bulbs by uniformly increasing the resistance of the switch when the knob is rotated to a lesser point. It is a circuit breaker as two conductors are connected to its terminals and a variable voltage resistor determines the flow of current between them.

3 0
4 years ago
Which parts of a presentation should be the most general
aivan3 [116]

Answer:

The introduction is the most important part of your presentation as it sets the tone for the entire presentation. Its primary purpose is to capture the attention of the audience, usually within the first 15 seconds. Make those first few words count! There are many styles you can use to get the audience's attention.

Explanation:

8 0
3 years ago
Other questions:
  • What is a good monitor for console gaming? (Any price)
    13·2 answers
  • A spreadsheet program has many subparts. What is the smallest unit in a spreadsheet?
    9·2 answers
  • Write a statement that declares a PrintWriter reference variable named output and initializes it to a reference to a newly creat
    5·1 answer
  • BRAINLIEST AND A LOT OF PTS Which line of code will only allow a symbol to be stored in a variable?
    12·2 answers
  • 4. Explain the term prejudice. What is an example of prejudice as it relates to parenting?
    11·1 answer
  • Given an 10-bit two's complement binary number, what is the decimal value of the largest negative integer that can be represente
    10·1 answer
  • A cubit is an ancient unit of length, roughly the distance between one’s fingers and elbow. The definition of one cubit is 18 in
    12·1 answer
  • Any one know??please let me know
    15·2 answers
  • Do you like Anime and if so if your 13-15 let’s be friends my number is 954 643 2050
    13·1 answer
  • Sean is studying at a friend's house and notices that he can connect to the wireless network without entering a wireless network
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!