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.
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<String> programBox = new JComboBox<String>();
JLabel programList = new JLabel("***
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<String> programBox = new JComboBox<String>();
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
}
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps