Instructions: Using replit as compiler, kindly modify and execute the program. Don't forget to provide screenshot of the program and its output.
[2nd-item] Instructions: Using replit as compiler, kindly modify and execute the program. Don't forget to provide screenshot of the program and its output.
Holidaypanel.java
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import http://java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;
import javax.swing.JPanel;
import javax.swing.Timer;
public class Holidaypanel extends JPanel{
private final int PANEL_WIDTH = 600;
private final int PANEL_HEIGHT = 350;
private Snowman snowman;
private Stars s1;
private Trees trees;
private House h;
public Holidaypanel() {
setBackground(Color.cyan);
//set size of window
setPreferredSize(new Dimension(PANEL_WIDTH, PANEL_HEIGHT));
trees = new Trees(280, PANEL_WIDTH);
snowman = new Snowman(150, 160);
s1 = new Stars(0, 130, 18, PANEL_WIDTH);
h = new House(480, 25);
}
public void paintComponent(Graphics page) {
super.paintComponent(page);
s1.draw(page);
snowman.draw(page);
trees.draw(page);
s1.setFixed(true);
h.draw(page);
}
}
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)