Have a colored background of your liking. I have used Color.getHSBColor(0.8f, 0.2f, 0.9f). • Two lines that divide the frame into 4 equal parts, that are x and y axes. • A triangle that is filled with a color. (You can use fillPolygon() function) • Add a control panel. • Add 6 buttons to the panel called “Translate Up”, “Translate Down”,“Translate Right”, “Translate Left”, “Reflect X” and “Reflect Y”. • Menubar of this program should have an item called “Set Default”which will reset the values of x and y to the values they had initially. • Modify the action listener according to the buttons and menu item. • Set the title to “Transformations” in the constructor and add your WindowListener. • Modify your paint method to draw 1 triangle and 2 lines with different colors. • The main method should create and display an instance of Transformations(). • The frame should be set to the size 800 by 800. • You can use a grid layout which is pretty straightforward. • Submit only one file called Transformations.java
• Have a colored background of your liking. I have used Color.getHSBColor(0.8f, 0.2f, 0.9f).
• Two lines that divide the frame into 4 equal parts, that are x and y axes.
• A triangle that is filled with a color. (You can use fillPolygon() function)
• Add a control panel.
• Add 6 buttons to the panel called “Translate Up”, “Translate Down”,“Translate Right”,
“Translate Left”, “Reflect X” and “Reflect Y”.
• Menubar of this
values of x and y to the values they had initially.
• Modify the action listener according to the buttons and menu item.
• Set the title to “Transformations” in the constructor and add your WindowListener.
• Modify your paint method to draw 1 triangle and 2 lines with different colors.
• The main method should create and display an instance of Transformations().
• The frame should be set to the size 800 by 800.
• You can use a grid layout which is pretty straightforward.
• Submit only one file called Transformations.java
![Transformations File
Transformations
Translate Up
Translate Down
Translate Right
Translate Left
Reflect Y
Reflect X](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F47f4c967-1b91-45d3-b87d-a8496dd05b55%2F21b3ffa8-e9dd-4b8f-a46c-880a1b1fe441%2Fjl8xmj_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![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)