Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java a. You are given a partially complete MouseTracker class which creates a simple JFrame with two JTextFields, and one feedback label. You must augment

image text in transcribed

image text in transcribed

Java

a. You are given a partially complete MouseTracker class which creates a simple JFrame with two JTextFields, and one feedback label. You must augment this class to make it respond to button events as described: When the mouse entered the bounds of textFieldi. Then, set the feedback label to "Mouse Entered the first textfield" b. When the mouse entered the bounds of textField2. Then, set the feedback label to "Mouse Entered the second textfield" When the mouse is out of the bounds of textField1 and textField2. Then, set the feedback (3.5 marks) G label to " Mouse Info appears here." import java.awt": import javax swing: import java.awt.event."; public class MouseTracker extends JFrame { final private TextField textField1: final private JTextField textField2: final private LLabel feedbackLabel: MouseTracker() { super("Mouse Tracker"); set Layout(new FlowLayout(); textField1= new JTextField(35); textField2= new JTextField(35): add(textField1); add{textField2); feedbacklabel = new JLabel("Mouse Info appears here.."): add(feedbacklabel): // TODO Part 1 :) // TODO Part 2 public static void main(String[] args) { MouseTracker mouseFrame = new Mouse Tracker(); mouseFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); mouseFrame.setSize(275, 110); mouseFrame setVisible(true); Page 6 of 7 2. What are the differences between: JList and JomboBox. In terms of: How many items can be selected, Scrolling capability and Event generated when user selects from them? (3 marks) JList JComboBox How many Items can be selected Scrolling Capability Event generated when the user select Page 5 of 1 2

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_2

Step: 3

blur-text-image_3

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

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago