I need help with the solution for this assignment.
Assignment 6 Graphical User Interface
Design a class called MyJFrame to reproduce Figures 1 and 2
Figure 1 Figure 2 Design a class called MyJButton that reproduces Figure 3. Notice that the image icon is changed.
Figure 3 Part II Add Functionality
Add functionality to the image button, such that when the mouse clicks the button, a frame similar to the one
below appears. Use the program code below to create this frame. However, you are responsible
for defining the event that will cause this to happen. // Import the basic graphics classes.
public class MyBasicFrame extends JFrame
// Create a constructor method
// All we do is call JFrame's constructor.
// We don't need anything special for this program.
/* The following methods are instance methods.
Create a paint() method to override the one in JFrame.
This is where the drawing happens.
We don't have to call it in our program, it gets called automatically whenever the frame needs to be redrawn,
like when it it made visible or moved or whatever.
public void paint(Graphics g)
g.drawLine(50,150,150,50); // Draw a line
g.fillOval(100, 100, 50, 50); } } g.setColor(Color.CYAN);
g.setFont(new Font("Times Roman", Font.BOLD, 20));
g.drawString("More than a line", 50, 180);
This question was answered on: Sep 18, 2020
Buy this answer for only: $15
This attachment is locked
We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy from our tutoring website www.aceyourhomework.com (Deadline assured. Flexible pricing. TurnItIn Report provided)
Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
About this QuestionSTATUS
Sep 18, 2020EXPERT
GET INSTANT HELP/h4>
We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.
You can also use these solutions:
- As a reference for in-depth understanding of the subject.
- As a source of ideas / reasoning for your own research (if properly referenced)
- For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
NEW ASSIGNMENT HELP?
Order New Solution. Quick Turnaround
Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.
WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN YOUR SET DEADLINE.