Question
Finish the JTVDownload application which allows a user to select one of at least five television shows to watch on demand. When the user selects
Finish the JTVDownload application which allows a user to select one of at least five television shows to watch on demand. When the user selects a show, display a brief synopsis. Include an editable combo box and allow the user to type the name of a television show and display an appropriate error message if the desired show is not available.
JTVDownload.java
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JTVDownload extends JFrame implements ItemListener {
JComboBox
JLabel programList = new JLabel("***Program List***");
JLabel stars = new JLabel("*****************************");
JTextField descripField = new JTextField(20);
String[] progs = {"Breaking Bad",
"Orange is the New Black", "Twilight Zone",
"Parks and Recreation", "Everybody Loves Raymond"
};
String[] descrips = {"", "Teacher becomes meth dealer",
"Life in women's prison",
"Classic science fiction episodes",
"Comedy in local government office",
"Family comedy with meddling in-laws"
};
public JTVDownload() {
// put code here
}
public static void main(String[] arguments) {
JTVDownload frame = new JTVDownload();
frame.setSize(300, 150);
frame.setVisible(true);
}
@Override
public void itemStateChanged(ItemEvent list) {
// put code here
}
}
JTVDownload2.java
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JTVDownload2 extends JFrame implements ItemListener {
JComboBox
JLabel programList = new JLabel("***Program List***");
JLabel stars = new JLabel("*****************************");
JTextField descripField = new JTextField(20);
String[] progs = {"Breaking Bad",
"Orange is the New Black", "Twilight Zone",
"Parks and Recreation", "Everybody Loves Raymond"
};
String[] descrips = {"", "Teacher becomes meth dealer",
"Life in women's prison",
"Classic science fiction episodes",
"Comedy in local government office",
"Family comedy with meddling in-laws"
};
public JTVDownload2() {
// put code here
}
public static void main(String[] arguments) {
JTVDownload2 frame = new JTVDownload2();
frame.setSize(350, 150);
frame.setVisible(true);
}
@Override
public void itemStateChanged(ItemEvent list) {
// put code here
}
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started