Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Build frame that has a Mainpanel covering it and the class MainPanel.java consists of a toolbar, and two subpanels. Choose different colors for the items.

Build frame that has a "Mainpanel" covering it and the class MainPanel.java consists of a toolbar, and two subpanels. Choose different colors for the items.

In constructor for MainPanel we fill a static one D array(imagaA) with images of the 5 gifs using toolkit code given to you in other lectures.

When user clicks one of the 5 buttons in the tool bar on top panel, this calls a button listener method (actionPerformed) and sets a variable ("selectedTile") in the code for the yellow center panel (TileGridPanel.java).

Then when user clicks on any spot in the yellow area(mouse click), this calls a mouse listener method in TileGridPanel.java and you fill a 5x 5 gif array with the selected image chosen from the static array in MainPanel.java. Then we fire a paint event to paint the 5 x 5 grid in the center of the yellow panel as below.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

1.4. What distinguishes the short run from the long run? (LO11-2)

Answered: 1 week ago