kilam_deelaw

tv

May 30th, 2017
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.32 KB | None | 0 0
  1. import java.awt.EventQueue;
  2. import java.awt.Font;
  3.  
  4. import javax.swing.ImageIcon;
  5. import javax.swing.JFrame;
  6. import javax.swing.JLabel;
  7. import javax.swing.JTextArea;
  8.  
  9. public class foxMovies extends tv_class {
  10.  
  11. private JFrame frame;
  12.  
  13. /**
  14. * Launch the application.
  15. */
  16. public static void main(String[] args) {
  17. EventQueue.invokeLater(new Runnable() {
  18. public void run() {
  19. try {
  20. foxMovies window = new foxMovies();
  21. window.frame.setVisible(true);
  22.  
  23. } catch (Exception e) {
  24. e.printStackTrace();
  25. }
  26. }
  27. });
  28. }
  29.  
  30. /**
  31. * Create the application.
  32. */
  33. public foxMovies() {
  34. initialize();
  35. }
  36.  
  37. /**
  38. * Initialize the contents of the frame.
  39. */
  40. private void initialize() {
  41. frame = new JFrame();
  42. frame.setBounds(100, 100, 450, 300);
  43. frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  44. }
  45.  
  46. @Override
  47. void play() {
  48. // TODO Auto-generated method stub
  49.  
  50. // TODO Auto-generated method stub
  51. foxMovies f = new foxMovies();
  52. f.setVisible(true);
  53. f.setBounds(400, 400, 390, 220);
  54.  
  55.  
  56.  
  57. JLabel lblNewLabel = new JLabel("");
  58. lblNewLabel.setIcon(new ImageIcon("C:\\Users\\USER\\Desktop\\5.jpg"));
  59. lblNewLabel.setBounds(0, 0, 216, 261);
  60. f.getContentPane().add(lblNewLabel);
  61.  
  62. }
  63.  
  64. }
  65.  
  66.  
  67.  
  68.  
  69. import java.awt.EventQueue;
  70.  
  71. import javax.swing.JFrame;
  72. import javax.swing.JLabel;
  73. import javax.swing.JTextArea;
  74. import javax.swing.border.Border;
  75. import javax.swing.ImageIcon;
  76. import javax.swing.JButton;
  77. import java.awt.event.ActionListener;
  78. import java.awt.event.ActionEvent;
  79. import java.awt.Font;
  80. import java.awt.Color;
  81. import java.awt.BorderLayout;
  82.  
  83. public class HBO extends tv_class {
  84.  
  85.  
  86. private JFrame frmHbohomeBox;
  87.  
  88. /**
  89. * Launch the application.
  90. */
  91. public static void main(String[] args) {
  92.  
  93. EventQueue.invokeLater(new Runnable() {
  94. public void run() {
  95. try {
  96. HBO window = new HBO();
  97. window.setVisible(true);
  98.  
  99. } catch (Exception e) {
  100. e.printStackTrace();
  101. }
  102. }
  103. });
  104. }
  105.  
  106. /**
  107. * Create the application.
  108. */
  109. public HBO() {
  110. getContentPane().setLayout(new BorderLayout(0, 0));
  111. initialize();
  112.  
  113. }
  114.  
  115. /**
  116. * Initialize the contents of the frame.
  117. */
  118. private void initialize() {
  119. frmHbohomeBox = new JFrame();
  120. frmHbohomeBox.setTitle("HBO (Home Box Office)");
  121. frmHbohomeBox.setBackground(Color.WHITE);
  122. frmHbohomeBox.getContentPane().setBackground(Color.GRAY);
  123. frmHbohomeBox.setBounds(100, 100, 450, 300);
  124. frmHbohomeBox.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  125. frmHbohomeBox.getContentPane().setLayout(null);
  126.  
  127. }
  128.  
  129. @Override
  130. void play() {
  131. // TODO Auto-generated method stub
  132. HBO h = new HBO();
  133. h.setVisible(true);
  134. h.setBounds(400, 400, 590, 340);
  135.  
  136. JTextArea textArea = new JTextArea();
  137. textArea.setFont(new Font("Jokerman", Font.PLAIN, 30));
  138. textArea.setEditable(false);
  139. textArea.setBounds(30, 90, 230, 60);
  140. h.getContentPane().add(textArea);
  141. textArea.setForeground(Color.BLACK);
  142. textArea.setText("Terminator 3");
  143. textArea.setBackground(Color.DARK_GRAY);
  144. JLabel lblNewLabel = new JLabel("");
  145. lblNewLabel.setIcon(new ImageIcon("C:\\Users\\USER\\Desktop\\274_5.jpg"));
  146. lblNewLabel.setBounds(0, 0, 216, 261);
  147. h.getContentPane().add(lblNewLabel);
  148.  
  149.  
  150. }
  151. }
  152.  
  153.  
  154.  
  155.  
  156. import java.awt.EventQueue;
  157. import java.awt.Font;
  158.  
  159. import javax.swing.JFrame;
  160. import javax.swing.JLabel;
  161. import javax.swing.JTextArea;
  162. import javax.swing.ImageIcon;
  163. import javax.swing.JButton;
  164. import java.awt.BorderLayout;
  165. import java.awt.Color;
  166. import java.awt.event.ActionListener;
  167. import java.awt.event.ActionEvent;
  168.  
  169. public class starMovies extends tv_class {
  170.  
  171. private JFrame frame;
  172.  
  173. /**
  174. * Launch the application.
  175. */
  176. public static void main(String[] args) {
  177. EventQueue.invokeLater(new Runnable() {
  178. public void run() {
  179. try {
  180. starMovies window = new starMovies();
  181. window.frame.setVisible(true);
  182. } catch (Exception e) {
  183. e.printStackTrace();
  184. }
  185. }
  186. });
  187. }
  188.  
  189. /**
  190. * Create the application.
  191. */
  192. public starMovies() {
  193. getContentPane().setLayout(new BorderLayout(0, 0));
  194. initialize();
  195.  
  196. }
  197.  
  198. /**
  199. * Initialize the contents of the frame.
  200. */
  201. private void initialize() {
  202. frame = new JFrame();
  203. frame.setBounds(100, 100, 450, 300);
  204. frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  205. frame.getContentPane().setLayout(null);
  206. }
  207.  
  208. @Override
  209. void play() {
  210. // TODO Auto-generated method stub
  211.  
  212. // TODO Auto-generated method stub
  213. starMovies s = new starMovies();
  214. s.setVisible(true);
  215. s.setBounds(400, 400, 400, 400);
  216. JTextArea textArea = new JTextArea();
  217. textArea.setFont(new Font("Jokerman", Font.PLAIN, 30));
  218. textArea.setEditable(false);
  219. textArea.setBackground(Color.gray);
  220. textArea.setBounds(70, 300, 244, 50);
  221. textArea.setText(" Interstellar");
  222. s.getContentPane().add(textArea);
  223.  
  224. JLabel lblNewLabel = new JLabel("");
  225. lblNewLabel.setIcon(new ImageIcon("C:\\Users\\USER\\Desktop\\8.jpeg"));
  226. lblNewLabel.setBounds(0, 0, 216, 261);
  227. s.getContentPane().add(lblNewLabel);
  228.  
  229.  
  230. }
  231. }
  232.  
  233.  
  234.  
  235.  
  236. import javax.swing.JFrame;
  237. import java.awt.EventQueue;
  238.  
  239. public abstract class tv_class extends JFrame {
  240.  
  241. private String size;
  242. private String no_of_hdmi;
  243. private String ascpect_ratio;
  244.  
  245.  
  246. public tv_class()
  247. {
  248. size="65 inches";
  249. no_of_hdmi="3";
  250. ascpect_ratio="99";
  251.  
  252. }
  253.  
  254. abstract void play();
  255.  
  256. public String getsize()
  257. {
  258. return size;
  259. }
  260.  
  261. public String getno_of_hdmi()
  262. {
  263. return no_of_hdmi;
  264. }
  265. public String getascpect_ratio()
  266. {
  267. return ascpect_ratio;
  268. }
  269.  
  270.  
  271. }
  272.  
  273.  
  274.  
  275.  
  276. import java.awt.EventQueue;
  277.  
  278. import javax.swing.JFrame;
  279. import javax.swing.JTextArea;
  280. import java.awt.Font;
  281.  
  282. public class tvProperties extends tv_class {
  283.  
  284. private JFrame frame;
  285.  
  286. /**
  287. * Launch the application.
  288. */
  289. public static void main(String[] args) {
  290. EventQueue.invokeLater(new Runnable() {
  291. public void run() {
  292. try {
  293. tvProperties window = new tvProperties();
  294. window.frame.setVisible(true);
  295. } catch (Exception e) {
  296. e.printStackTrace();
  297. }
  298. }
  299. });
  300. }
  301.  
  302. /**
  303. * Create the application.
  304. */
  305. public tvProperties() {
  306. getContentPane().setLayout(null);
  307.  
  308. JTextArea textArea = new JTextArea();
  309. textArea.setFont(new Font("Jokerman", Font.PLAIN, 36));
  310. textArea.setBounds(158, 213, 123, 22);
  311. getContentPane().add(textArea);
  312. initialize();
  313. }
  314.  
  315. /**
  316. * Initialize the contents of the frame.
  317. */
  318. private void initialize() {
  319. frame = new JFrame();
  320. frame.setBounds(100, 100, 450, 300);
  321. frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  322. }
  323.  
  324. @Override
  325. void play() {
  326. // TODO Auto-generated method stub
  327.  
  328. }
  329. }
  330.  
  331.  
  332.  
  333.  
  334. import java.awt.EventQueue;
  335. import java.awt.Font;
  336.  
  337. import javax.swing.JFrame;
  338. import javax.swing.JButton;
  339. import java.awt.event.ActionListener;
  340. import java.util.ArrayList;
  341. import java.util.Random;
  342. import java.awt.event.ActionEvent;
  343. import javax.swing.JTextArea;
  344. import javax.swing.ImageIcon;
  345. import java.awt.Color;
  346. import javax.swing.JLabel;
  347.  
  348. public class RemoteClass extends tv_class {
  349.  
  350. private JFrame frmSonyRemote;
  351. static ArrayList<Class> arr;
  352.  
  353. /**
  354. * Launch the application.
  355. */
  356. public static void main(String[] args) {
  357.  
  358. EventQueue.invokeLater(new Runnable() {
  359. public void run() {
  360. try {
  361. RemoteClass window = new RemoteClass();
  362. window.frmSonyRemote.setVisible(true);
  363.  
  364.  
  365.  
  366.  
  367. arr = new ArrayList<Class>();
  368. HBO h = new HBO();
  369. starMovies s = new starMovies();
  370. foxMovies f = new foxMovies();
  371.  
  372. arr.add(HBO.class);
  373. arr.add(starMovies.class);
  374. arr.add(foxMovies.class);
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382. } catch (Exception e) {
  383. e.printStackTrace();
  384. }
  385. }
  386. });
  387. }
  388.  
  389. /**
  390. * Create the application.
  391. */
  392. public RemoteClass() {
  393. initialize();
  394.  
  395. }
  396.  
  397. /**
  398. * Initialize the contents of the frame.
  399. */
  400. private void initialize() {
  401. frmSonyRemote = new JFrame();
  402. frmSonyRemote.setTitle("Sony");
  403. frmSonyRemote.setResizable(false);
  404. frmSonyRemote.setAlwaysOnTop(true);
  405. frmSonyRemote.getContentPane().setBackground(Color.GRAY);
  406. frmSonyRemote.setBounds(100, 100, 218, 300);
  407. frmSonyRemote.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  408. frmSonyRemote.getContentPane().setLayout(null);
  409.  
  410. JButton btnNewButton = new JButton("");
  411. btnNewButton.setBackground(Color.BLACK);
  412. btnNewButton.setIcon(new ImageIcon("C:\\Users\\USER\\Desktop\\flecha.png"));
  413. btnNewButton.addActionListener(new ActionListener() {
  414. public void actionPerformed(ActionEvent arg0) {
  415.  
  416.  
  417. Random rand = new Random();
  418. int n = rand.nextInt(3)+0;
  419.  
  420.  
  421.  
  422. Class s=arr.get(n);
  423.  
  424. String y=s.getName();
  425.  
  426.  
  427. if(y.equals("HBO"))
  428. {
  429. HBO h = new HBO();
  430. h.play();
  431.  
  432.  
  433.  
  434. }
  435. else if(y.equals("starMovies"))
  436. {
  437. starMovies sm = new starMovies();
  438. sm.play();
  439.  
  440.  
  441. }
  442. else if(y.equals("foxMovies"))
  443. {
  444.  
  445. foxMovies f = new foxMovies();
  446. f.play();
  447. }
  448.  
  449.  
  450.  
  451. }
  452. });
  453. btnNewButton.setBounds(72, 83, 67, 67);
  454. frmSonyRemote.getContentPane().add(btnNewButton);
  455.  
  456. JButton btnNewButton_1 = new JButton("Tv Properties");
  457. btnNewButton_1.setForeground(Color.WHITE);
  458. btnNewButton_1.setFont(new Font("Nirmala UI", Font.PLAIN, 15));
  459. btnNewButton_1.setBackground(Color.GRAY);
  460. btnNewButton_1.addActionListener(new ActionListener() {
  461. public void actionPerformed(ActionEvent arg0) {
  462.  
  463.  
  464. tvProperties tp = new tvProperties();
  465. tp.setVisible(true);
  466. tp.setBounds(100, 100, 450, 300);
  467. JTextArea textArea = new JTextArea();
  468. textArea.setBounds(46, 64, 296, 126);
  469. tp.getContentPane().add(textArea);
  470.  
  471.  
  472. textArea.append(tp.getsize());
  473. textArea.append("\n");
  474. textArea.append(tp.getno_of_hdmi());
  475. textArea.append("\n");
  476. textArea.append(tp.getascpect_ratio());
  477.  
  478.  
  479. }
  480. });
  481. btnNewButton_1.setBounds(47, 217, 125, 23);
  482. frmSonyRemote.getContentPane().add(btnNewButton_1);
  483.  
  484. JLabel lblNewLabel = new JLabel("");
  485. lblNewLabel.setIcon(new ImageIcon("C:\\Users\\USER\\Desktop\\1.jpg"));
  486. lblNewLabel.setBounds(0, 0, 231, 271);
  487. frmSonyRemote.getContentPane().add(lblNewLabel);
  488. }
  489.  
  490. @Override
  491. void play() {
  492. // TODO Auto-generated method stub
  493.  
  494. }
  495. }
Add Comment
Please, Sign In to add comment