Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.EventQueue;
- import java.awt.Font;
- import javax.swing.ImageIcon;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JTextArea;
- public class foxMovies extends tv_class {
- private JFrame frame;
- /**
- * Launch the application.
- */
- public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- foxMovies window = new foxMovies();
- window.frame.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }
- /**
- * Create the application.
- */
- public foxMovies() {
- initialize();
- }
- /**
- * Initialize the contents of the frame.
- */
- private void initialize() {
- frame = new JFrame();
- frame.setBounds(100, 100, 450, 300);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- }
- @Override
- void play() {
- // TODO Auto-generated method stub
- // TODO Auto-generated method stub
- foxMovies f = new foxMovies();
- f.setVisible(true);
- f.setBounds(400, 400, 390, 220);
- JLabel lblNewLabel = new JLabel("");
- lblNewLabel.setIcon(new ImageIcon("C:\\Users\\USER\\Desktop\\5.jpg"));
- lblNewLabel.setBounds(0, 0, 216, 261);
- f.getContentPane().add(lblNewLabel);
- }
- }
- import java.awt.EventQueue;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JTextArea;
- import javax.swing.border.Border;
- import javax.swing.ImageIcon;
- import javax.swing.JButton;
- import java.awt.event.ActionListener;
- import java.awt.event.ActionEvent;
- import java.awt.Font;
- import java.awt.Color;
- import java.awt.BorderLayout;
- public class HBO extends tv_class {
- private JFrame frmHbohomeBox;
- /**
- * Launch the application.
- */
- public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- HBO window = new HBO();
- window.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }
- /**
- * Create the application.
- */
- public HBO() {
- getContentPane().setLayout(new BorderLayout(0, 0));
- initialize();
- }
- /**
- * Initialize the contents of the frame.
- */
- private void initialize() {
- frmHbohomeBox = new JFrame();
- frmHbohomeBox.setTitle("HBO (Home Box Office)");
- frmHbohomeBox.setBackground(Color.WHITE);
- frmHbohomeBox.getContentPane().setBackground(Color.GRAY);
- frmHbohomeBox.setBounds(100, 100, 450, 300);
- frmHbohomeBox.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frmHbohomeBox.getContentPane().setLayout(null);
- }
- @Override
- void play() {
- // TODO Auto-generated method stub
- HBO h = new HBO();
- h.setVisible(true);
- h.setBounds(400, 400, 590, 340);
- JTextArea textArea = new JTextArea();
- textArea.setFont(new Font("Jokerman", Font.PLAIN, 30));
- textArea.setEditable(false);
- textArea.setBounds(30, 90, 230, 60);
- h.getContentPane().add(textArea);
- textArea.setForeground(Color.BLACK);
- textArea.setText("Terminator 3");
- textArea.setBackground(Color.DARK_GRAY);
- JLabel lblNewLabel = new JLabel("");
- lblNewLabel.setIcon(new ImageIcon("C:\\Users\\USER\\Desktop\\274_5.jpg"));
- lblNewLabel.setBounds(0, 0, 216, 261);
- h.getContentPane().add(lblNewLabel);
- }
- }
- import java.awt.EventQueue;
- import java.awt.Font;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JTextArea;
- import javax.swing.ImageIcon;
- import javax.swing.JButton;
- import java.awt.BorderLayout;
- import java.awt.Color;
- import java.awt.event.ActionListener;
- import java.awt.event.ActionEvent;
- public class starMovies extends tv_class {
- private JFrame frame;
- /**
- * Launch the application.
- */
- public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- starMovies window = new starMovies();
- window.frame.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }
- /**
- * Create the application.
- */
- public starMovies() {
- getContentPane().setLayout(new BorderLayout(0, 0));
- initialize();
- }
- /**
- * Initialize the contents of the frame.
- */
- private void initialize() {
- frame = new JFrame();
- frame.setBounds(100, 100, 450, 300);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.getContentPane().setLayout(null);
- }
- @Override
- void play() {
- // TODO Auto-generated method stub
- // TODO Auto-generated method stub
- starMovies s = new starMovies();
- s.setVisible(true);
- s.setBounds(400, 400, 400, 400);
- JTextArea textArea = new JTextArea();
- textArea.setFont(new Font("Jokerman", Font.PLAIN, 30));
- textArea.setEditable(false);
- textArea.setBackground(Color.gray);
- textArea.setBounds(70, 300, 244, 50);
- textArea.setText(" Interstellar");
- s.getContentPane().add(textArea);
- JLabel lblNewLabel = new JLabel("");
- lblNewLabel.setIcon(new ImageIcon("C:\\Users\\USER\\Desktop\\8.jpeg"));
- lblNewLabel.setBounds(0, 0, 216, 261);
- s.getContentPane().add(lblNewLabel);
- }
- }
- import javax.swing.JFrame;
- import java.awt.EventQueue;
- public abstract class tv_class extends JFrame {
- private String size;
- private String no_of_hdmi;
- private String ascpect_ratio;
- public tv_class()
- {
- size="65 inches";
- no_of_hdmi="3";
- ascpect_ratio="99";
- }
- abstract void play();
- public String getsize()
- {
- return size;
- }
- public String getno_of_hdmi()
- {
- return no_of_hdmi;
- }
- public String getascpect_ratio()
- {
- return ascpect_ratio;
- }
- }
- import java.awt.EventQueue;
- import javax.swing.JFrame;
- import javax.swing.JTextArea;
- import java.awt.Font;
- public class tvProperties extends tv_class {
- private JFrame frame;
- /**
- * Launch the application.
- */
- public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- tvProperties window = new tvProperties();
- window.frame.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }
- /**
- * Create the application.
- */
- public tvProperties() {
- getContentPane().setLayout(null);
- JTextArea textArea = new JTextArea();
- textArea.setFont(new Font("Jokerman", Font.PLAIN, 36));
- textArea.setBounds(158, 213, 123, 22);
- getContentPane().add(textArea);
- initialize();
- }
- /**
- * Initialize the contents of the frame.
- */
- private void initialize() {
- frame = new JFrame();
- frame.setBounds(100, 100, 450, 300);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- }
- @Override
- void play() {
- // TODO Auto-generated method stub
- }
- }
- import java.awt.EventQueue;
- import java.awt.Font;
- import javax.swing.JFrame;
- import javax.swing.JButton;
- import java.awt.event.ActionListener;
- import java.util.ArrayList;
- import java.util.Random;
- import java.awt.event.ActionEvent;
- import javax.swing.JTextArea;
- import javax.swing.ImageIcon;
- import java.awt.Color;
- import javax.swing.JLabel;
- public class RemoteClass extends tv_class {
- private JFrame frmSonyRemote;
- static ArrayList<Class> arr;
- /**
- * Launch the application.
- */
- public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- RemoteClass window = new RemoteClass();
- window.frmSonyRemote.setVisible(true);
- arr = new ArrayList<Class>();
- HBO h = new HBO();
- starMovies s = new starMovies();
- foxMovies f = new foxMovies();
- arr.add(HBO.class);
- arr.add(starMovies.class);
- arr.add(foxMovies.class);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }
- /**
- * Create the application.
- */
- public RemoteClass() {
- initialize();
- }
- /**
- * Initialize the contents of the frame.
- */
- private void initialize() {
- frmSonyRemote = new JFrame();
- frmSonyRemote.setTitle("Sony");
- frmSonyRemote.setResizable(false);
- frmSonyRemote.setAlwaysOnTop(true);
- frmSonyRemote.getContentPane().setBackground(Color.GRAY);
- frmSonyRemote.setBounds(100, 100, 218, 300);
- frmSonyRemote.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frmSonyRemote.getContentPane().setLayout(null);
- JButton btnNewButton = new JButton("");
- btnNewButton.setBackground(Color.BLACK);
- btnNewButton.setIcon(new ImageIcon("C:\\Users\\USER\\Desktop\\flecha.png"));
- btnNewButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- Random rand = new Random();
- int n = rand.nextInt(3)+0;
- Class s=arr.get(n);
- String y=s.getName();
- if(y.equals("HBO"))
- {
- HBO h = new HBO();
- h.play();
- }
- else if(y.equals("starMovies"))
- {
- starMovies sm = new starMovies();
- sm.play();
- }
- else if(y.equals("foxMovies"))
- {
- foxMovies f = new foxMovies();
- f.play();
- }
- }
- });
- btnNewButton.setBounds(72, 83, 67, 67);
- frmSonyRemote.getContentPane().add(btnNewButton);
- JButton btnNewButton_1 = new JButton("Tv Properties");
- btnNewButton_1.setForeground(Color.WHITE);
- btnNewButton_1.setFont(new Font("Nirmala UI", Font.PLAIN, 15));
- btnNewButton_1.setBackground(Color.GRAY);
- btnNewButton_1.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- tvProperties tp = new tvProperties();
- tp.setVisible(true);
- tp.setBounds(100, 100, 450, 300);
- JTextArea textArea = new JTextArea();
- textArea.setBounds(46, 64, 296, 126);
- tp.getContentPane().add(textArea);
- textArea.append(tp.getsize());
- textArea.append("\n");
- textArea.append(tp.getno_of_hdmi());
- textArea.append("\n");
- textArea.append(tp.getascpect_ratio());
- }
- });
- btnNewButton_1.setBounds(47, 217, 125, 23);
- frmSonyRemote.getContentPane().add(btnNewButton_1);
- JLabel lblNewLabel = new JLabel("");
- lblNewLabel.setIcon(new ImageIcon("C:\\Users\\USER\\Desktop\\1.jpg"));
- lblNewLabel.setBounds(0, 0, 231, 271);
- frmSonyRemote.getContentPane().add(lblNewLabel);
- }
- @Override
- void play() {
- // TODO Auto-generated method stub
- }
- }
Add Comment
Please, Sign In to add comment