Guest User

Untitled

a guest
Dec 17th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.31 KB | None | 0 0
  1. import java.awt.*;
  2. import java.awt.FlowLayout;
  3. import javax.swing.*;
  4.  
  5. public class MaxsFriedChicken extends JFrame{
  6.  
  7. JLabel title, fdname1, fdname2, prc1, prc2, qty1, qty2;
  8. JLabel img1, img2, img3, img4, img5;
  9. JLabel info1, info2, info3, info4, info5, info6, info7, info8, info9, info10;
  10. JTextField qtty1, qtty2, qtty3;
  11. JButton add1, add2, add3, add4, add5;
  12.  
  13. public MaxsFriedChicken(){
  14.  
  15. title = new JLabel ("MAX's MENU");
  16. getContentPane().add(title);
  17. title.setBounds(350,0,300,50);
  18. title.setFont(new Font("Broadway", Font.PLAIN,35));
  19. title.setForeground(Color.black);
  20.  
  21. fdname1 = new JLabel ("Regular Fried Chicken");
  22. getContentPane().add(fdname1);
  23. fdname1.setBounds(300,100,350,50);
  24. fdname1.setFont(new Font("Bradley Hand ITC", Font.BOLD,22));
  25. fdname1.setForeground(Color.black);
  26.  
  27.  
  28. img1 = new JLabel (new ImageIcon("Max's Fried Chicken2.jpg"));
  29. getContentPane().add(img1);
  30. img1.setBounds(20,40,300,300);
  31.  
  32. info1 = new JLabel ("The original, classic fried chicken that made Max's popular. It");
  33. getContentPane().add(info1);
  34. info1.setBounds(300,130,550,50);
  35. info1.setFont(new Font("Bradley Hand ITC", Font.PLAIN,20));
  36. info1.setForeground(Color.black);
  37.  
  38. info2 = new JLabel("is cooked to golden perfection, processed in a very unique way");
  39. getContentPane().add(info2);
  40. info2.setBounds(300,150,550,50);
  41. info2.setFont(new Font("Bradley Hand ITC", Font.PLAIN,20));
  42. info2.setForeground(Color.black);
  43.  
  44. info3 = new JLabel("which gives this product the unforgettable sarap to the bones ");
  45. getContentPane().add(info3);
  46. info3.setBounds(300,170,550,50);
  47. info3.setFont(new Font("Bradley Hand ITC", Font.PLAIN,20));
  48. info3.setForeground(Color.black);
  49.  
  50. info4 = new JLabel("quality, spiced just right and totally MSG-free.");
  51. getContentPane().add(info4);
  52. info4.setBounds(300,190,550,50);
  53. info4.setFont(new Font("Bradley Hand ITC", Font.PLAIN,20));
  54. info4.setForeground(Color.black);
  55.  
  56. prc1 = new JLabel ("Price: PH 400.00");
  57. getContentPane().add(prc1);
  58. prc1.setBounds(320,230,300,50);
  59. prc1.setFont(new Font("Britannic Bold", Font.PLAIN,18));
  60. prc1.setForeground(Color.black);
  61.  
  62. qty1 = new JLabel ("Quantity:");
  63. getContentPane().add(qty1);
  64. qty1.setBounds(500,230,300,50);
  65. qty1.setFont(new Font("Britannic Bold", Font.PLAIN,18));
  66. qty1.setForeground(Color.black);
  67.  
  68. qtty1 = new JTextField ("");
  69. getContentPane().add(qtty1);
  70. qtty1.setBounds(580,235,40,30);
  71. qtty1.setFont(new Font("Britannic Bold", Font.PLAIN,18));
  72. qtty1.setForeground(Color.black);
  73.  
  74. add1 = new JButton ("Add To Tray");
  75. getContentPane().add(add1);
  76. add1.setBounds(650,235,130,30);
  77. add1.setBackground(Color.black);
  78. add1.setForeground(Color.red);
  79.  
  80. img2 = new JLabel (new ImageIcon("Family Chicken Basket.jpg"));
  81. getContentPane().add(img2);
  82. img2.setBounds(20,300,300,300);
  83.  
  84. fdname2 = new JLabel ("Family Chicken Basket");
  85. getContentPane().add(fdname2);
  86. fdname2.setBounds(300,350,350,50);
  87. fdname2.setFont(new Font("Bradley Hand ITC", Font.BOLD,22));
  88. fdname2.setForeground(Color.black);
  89.  
  90. info5 = new JLabel("8 pieces of favorite Max's fried chicken (leg and thigh parts)");
  91. getContentPane().add(info5);
  92. info5.setBounds(300,380,550,50);
  93. info5.setFont(new Font("Bradley Hand ITC", Font.PLAIN,20));
  94. info5.setForeground(Color.black);
  95.  
  96. info6 = new JLabel("cooked to an unmatched perfection to satisfy the guests' craving.");
  97. getContentPane().add(info6);
  98. info6.setBounds(300,400,550,50);
  99. info6.setFont(new Font("Bradley Hand ITC", Font.PLAIN,20));
  100. info6.setForeground(Color.black);
  101.  
  102. info7 = new JLabel("This is still the original and classic fried chicken that");
  103. getContentPane().add(info7);
  104. info7.setBounds(300,420,550,50);
  105. info7.setFont(new Font("Bradley Hand ITC", Font.PLAIN,20));
  106. info7.setForeground(Color.black);
  107.  
  108. info8 = new JLabel("made Max's world famous and a Filipino institution. Golden");
  109. getContentPane().add(info8);
  110. info8.setBounds(300,440,550,50);
  111. info8.setFont(new Font("Bradley Hand ITC", Font.PLAIN,20));
  112. info8.setForeground(Color.black);
  113.  
  114. info9 = new JLabel("fried to perfection with a unique blend of secret spices.");
  115. getContentPane().add(info9);
  116. info9.setBounds(300,460,550,50);
  117. info9.setFont(new Font("Bradley Hand ITC", Font.PLAIN,20));
  118. info9.setForeground(Color.black);
  119.  
  120. prc2 = new JLabel ("Price: PH 500.00");
  121. getContentPane().add(prc2);
  122. prc2.setBounds(320,500,300,50);
  123. prc2.setFont(new Font("Britannic Bold", Font.PLAIN,18));
  124. prc2.setForeground(Color.black);
  125.  
  126. qty2 = new JLabel ("Quantity:");
  127. getContentPane().add(qty2);
  128. qty2.setBounds(500,500,300,50);
  129. qty2.setFont(new Font("Britannic Bold", Font.PLAIN,18));
  130. qty2.setForeground(Color.black);
  131.  
  132. qtty2 = new JTextField ("");
  133. getContentPane().add(qtty2);
  134. qtty2.setBounds(580,505,40,30);
  135. qtty2.setFont(new Font("Britannic Bold", Font.PLAIN,18));
  136. qtty2.setForeground(Color.black);
  137.  
  138. add2 = new JButton ("Add To Tray");
  139. getContentPane().add(add2);
  140. add2.setBounds(650,505,130,30);
  141. add2.setBackground(Color.black);
  142. add2.setForeground(Color.red);
  143.  
  144. add3 = new JButton ("Add To Tray");
  145. getContentPane().add(add3);
  146. add3.setBounds(40,330,130,30);
  147.  
  148. add4 = new JButton ("Add To Tray");
  149. getContentPane().add(add4);
  150. add4.setBounds(40,330,130,30);
  151.  
  152. add5 = new JButton ("Add To Tray");
  153. getContentPane().add(add5);
  154. add5.setBounds(40,330,130,30);
  155.  
  156.  
  157. JPanel pane = new JPanel();
  158. getContentPane().add(pane);
  159. pane.setBounds(50,150,300,400);
  160. pane.setBackground(Color.red);
  161. pane.setLayout(null);
  162. pane.setBorder(BorderFactory.createLineBorder(Color.black));
  163.  
  164. setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  165.  
  166. }
  167.  
  168. public static void main (String[] args) {
  169.  
  170. MaxsFriedChicken fL = new MaxsFriedChicken();
  171. fL.setTitle ("Max's Restaurant");
  172. fL.setVisible (true);
  173. fL.setResizable (false);
  174. fL.setBounds (150,1,1000,700);
  175.  
  176. }
  177.  
  178. }
Add Comment
Please, Sign In to add comment