Advertisement
Guest User

venya123

a guest
Dec 12th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.35 KB | None | 0 0
  1. import java.awt.BorderLayout;
  2. import java.awt.EventQueue;
  3.  
  4. import javax.swing.JFrame;
  5. import javax.swing.JPanel;
  6. import javax.swing.border.EmptyBorder;
  7. import javax.swing.JLabel;
  8. import java.awt.Font;
  9. import java.awt.Color;
  10. import javax.swing.JButton;
  11. import java.awt.event.ActionListener;
  12. import java.awt.event.ActionEvent;
  13.  
  14. public class AZBUKA extends JFrame {
  15.  
  16. private JPanel contentPane;
  17.  
  18. /**
  19. * Launch the application.
  20. */
  21. public static void main(String[] args) {
  22. EventQueue.invokeLater(new Runnable() {
  23. public void run() {
  24. try {
  25. AZBUKA frame1 = new AZBUKA();
  26. frame1.setVisible(true);
  27. } catch (Exception e) {
  28. e.printStackTrace();
  29. }
  30. }
  31. });
  32. }
  33.  
  34. /**
  35. * Create the frame.
  36. */
  37. public AZBUKA() {
  38.  
  39.  
  40.  
  41. setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  42. setBounds(100, 100, 705, 448);
  43. contentPane = new JPanel();
  44. contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
  45. setContentPane(contentPane);
  46. contentPane.setLayout(null);
  47.  
  48. JLabel lblEnglishAl = new JLabel("English alphabet");
  49. lblEnglishAl.setForeground(new Color(255, 0, 0));
  50. lblEnglishAl.setFont(new Font("Times New Roman", Font.BOLD, 28));
  51. lblEnglishAl.setBounds(227, 11, 224, 42);
  52. contentPane.add(lblEnglishAl);
  53.  
  54. JButton button = new JButton("Aa");
  55. button.addActionListener(new ActionListener() {
  56. public void actionPerformed(ActionEvent e)
  57. {
  58. simple sim = new simple();
  59. BUKVA buk = new BUKVA();
  60. sim.setTitle("A");
  61. sim.setDescription("Apple");
  62. sim.setPrimers(new primers = {"Aqua","Primer1","Primer2"});
  63. //buk.setDescription();
  64. // buk.BukvaText.setText(A);
  65. buk.setVisible(true);
  66. }
  67. });
  68. button.setForeground(Color.RED);
  69. button.setToolTipText("");
  70. button.setFont(new Font("Times New Roman", Font.BOLD, 36));
  71. button.setBounds(43, 68, 77, 63);
  72. contentPane.add(button);
  73. JButton btnBb = new JButton("Bb");
  74. btnBb.setToolTipText("");
  75. btnBb.setForeground(new Color(34, 139, 34));
  76. btnBb.setFont(new Font("Times New Roman", Font.BOLD, 31));
  77. btnBb.setBounds(130, 68, 77, 63);
  78. contentPane.add(btnBb);
  79. JButton btnCc = new JButton("Cc");
  80. btnCc.setToolTipText("");
  81. btnCc.setForeground(new Color(0, 0, 255));
  82. btnCc.setFont(new Font("Times New Roman", Font.BOLD, 36));
  83. btnCc.setBounds(217, 68, 77, 63);
  84. contentPane.add(btnCc);
  85. JButton btnDd = new JButton("Dd");
  86. btnDd.setToolTipText("");
  87. btnDd.setForeground(new Color(255, 69, 0));
  88. btnDd.setFont(new Font("Times New Roman", Font.BOLD, 31));
  89. btnDd.setBounds(304, 68, 77, 63);
  90. contentPane.add(btnDd);
  91. JButton btnEe = new JButton("Ee");
  92. btnEe.setToolTipText("");
  93. btnEe.setForeground(Color.RED);
  94. btnEe.setFont(new Font("Times New Roman", Font.BOLD, 36));
  95. btnEe.setBounds(394, 68, 77, 63);
  96. contentPane.add(btnEe);
  97. JButton btnFf = new JButton("Ff");
  98. btnFf.setToolTipText("");
  99. btnFf.setForeground(new Color(34, 139, 34));
  100. btnFf.setFont(new Font("Times New Roman", Font.BOLD, 36));
  101. btnFf.setBounds(481, 68, 77, 63);
  102. contentPane.add(btnFf);
  103. JButton btnGg = new JButton("Gg");
  104. btnGg.setToolTipText("");
  105. btnGg.setForeground(Color.RED);
  106. btnGg.setFont(new Font("Times New Roman", Font.BOLD, 34));
  107. btnGg.setBounds(568, 68, 77, 63);
  108. contentPane.add(btnGg);
  109. JButton btnHh = new JButton("Hh");
  110. btnHh.setToolTipText("");
  111. btnHh.setForeground(new Color(255, 69, 0));
  112. btnHh.setFont(new Font("Times New Roman", Font.BOLD, 31));
  113. btnHh.setBounds(43, 142, 77, 63);
  114. contentPane.add(btnHh);
  115. JButton btnIi = new JButton("Ii");
  116. btnIi.setToolTipText("");
  117. btnIi.setForeground(new Color(0, 0, 255));
  118. btnIi.setFont(new Font("Times New Roman", Font.BOLD, 36));
  119. btnIi.setBounds(130, 142, 77, 63);
  120. contentPane.add(btnIi);
  121. JButton btnGg_1 = new JButton("Gg");
  122. btnGg_1.setToolTipText("");
  123. btnGg_1.setForeground(new Color(139, 0, 139));
  124. btnGg_1.setFont(new Font("Times New Roman", Font.BOLD, 34));
  125. btnGg_1.setBounds(217, 142, 77, 63);
  126. contentPane.add(btnGg_1);
  127. JButton btnKk = new JButton("Kk");
  128. btnKk.setToolTipText("");
  129. btnKk.setForeground(new Color(255, 0, 0));
  130. btnKk.setFont(new Font("Times New Roman", Font.BOLD, 31));
  131. btnKk.setBounds(304, 142, 77, 63);
  132. contentPane.add(btnKk);
  133. JButton btnLl = new JButton("Ll");
  134. btnLl.setToolTipText("");
  135. btnLl.setForeground(new Color(128, 0, 128));
  136. btnLl.setFont(new Font("Times New Roman", Font.BOLD, 36));
  137. btnLl.setBounds(394, 142, 77, 63);
  138. contentPane.add(btnLl);
  139. JButton btnMm = new JButton("Mm");
  140. btnMm.setToolTipText("");
  141. btnMm.setForeground(new Color(0, 0, 255));
  142. btnMm.setFont(new Font("Times New Roman", Font.BOLD, 22));
  143. btnMm.setBounds(481, 142, 77, 63);
  144. contentPane.add(btnMm);
  145. JButton btnNn = new JButton("Nn");
  146. btnNn.setToolTipText("");
  147. btnNn.setForeground(new Color(255, 69, 0));
  148. btnNn.setFont(new Font("Times New Roman", Font.BOLD, 33));
  149. btnNn.setBounds(568, 142, 77, 63);
  150. contentPane.add(btnNn);
  151. JButton btnOo = new JButton("Oo");
  152. btnOo.setToolTipText("");
  153. btnOo.setForeground(new Color(34, 139, 34));
  154. btnOo.setFont(new Font("Times New Roman", Font.BOLD, 32));
  155. btnOo.setBounds(43, 216, 77, 63);
  156. contentPane.add(btnOo);
  157. JButton btnPp = new JButton("Pp");
  158. btnPp.setToolTipText("");
  159. btnPp.setForeground(new Color(128, 0, 128));
  160. btnPp.setFont(new Font("Times New Roman", Font.BOLD, 36));
  161. btnPp.setBounds(130, 216, 77, 63);
  162. contentPane.add(btnPp);
  163. JButton btnQq = new JButton("Qq");
  164. btnQq.setToolTipText("");
  165. btnQq.setForeground(new Color(255, 69, 0));
  166. btnQq.setFont(new Font("Times New Roman", Font.BOLD, 33));
  167. btnQq.setBounds(217, 216, 77, 63);
  168. contentPane.add(btnQq);
  169. JButton btnRr = new JButton("Rr");
  170. btnRr.setToolTipText("");
  171. btnRr.setForeground(new Color(34, 139, 34));
  172. btnRr.setFont(new Font("Times New Roman", Font.BOLD, 36));
  173. btnRr.setBounds(304, 216, 77, 63);
  174. contentPane.add(btnRr);
  175. JButton btnSs = new JButton("Ss");
  176. btnSs.setToolTipText("");
  177. btnSs.setForeground(Color.RED);
  178. btnSs.setFont(new Font("Times New Roman", Font.BOLD, 36));
  179. btnSs.setBounds(394, 216, 77, 63);
  180. contentPane.add(btnSs);
  181. JButton btnTt = new JButton("Tt");
  182. btnTt.setToolTipText("");
  183. btnTt.setForeground(new Color(34, 139, 34));
  184. btnTt.setFont(new Font("Times New Roman", Font.BOLD, 36));
  185. btnTt.setBounds(481, 216, 77, 63);
  186. contentPane.add(btnTt);
  187. JButton btnUu = new JButton("Uu");
  188. btnUu.setToolTipText("");
  189. btnUu.setForeground(new Color(0, 0, 255));
  190. btnUu.setFont(new Font("Times New Roman", Font.BOLD, 33));
  191. btnUu.setBounds(568, 216, 77, 63);
  192. contentPane.add(btnUu);
  193. JButton btnVv = new JButton("Vv");
  194. btnVv.setToolTipText("");
  195. btnVv.setForeground(Color.RED);
  196. btnVv.setFont(new Font("Times New Roman", Font.BOLD, 36));
  197. btnVv.setBounds(130, 290, 77, 63);
  198. contentPane.add(btnVv);
  199. JButton btnWw = new JButton("Ww");
  200. btnWw.setToolTipText("");
  201. btnWw.setForeground(new Color(34, 139, 34));
  202. btnWw.setFont(new Font("Times New Roman", Font.BOLD, 24));
  203. btnWw.setBounds(217, 290, 77, 63);
  204. contentPane.add(btnWw);
  205. JButton btnXx = new JButton("Xx");
  206. btnXx.setToolTipText("");
  207. btnXx.setForeground(new Color(0, 0, 255));
  208. btnXx.setFont(new Font("Times New Roman", Font.BOLD, 34));
  209. btnXx.setBounds(304, 290, 77, 63);
  210. contentPane.add(btnXx);
  211. JButton btnYy = new JButton("Yy");
  212. btnYy.setToolTipText("");
  213. btnYy.setForeground(new Color(128, 0, 128));
  214. btnYy.setFont(new Font("Times New Roman", Font.BOLD, 36));
  215. btnYy.setBounds(394, 290, 77, 63);
  216. contentPane.add(btnYy);
  217. JButton btnZz = new JButton("Zz");
  218. btnZz.setToolTipText("");
  219. btnZz.setForeground(Color.RED);
  220. btnZz.setFont(new Font("Times New Roman", Font.BOLD, 36));
  221. btnZz.setBounds(481, 290, 77, 63);
  222. contentPane.add(btnZz);
  223. }
  224. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement