Member Login

Username:
Password:
Remember:

ImaBeatAlex.java | 7.84 KB | cgrove | March 25th, 2010 | 1 Downloads | 157 Views
File Name: ImaBeatAlex.java
File Size: 7.84 KB
Uploaded By:  cgrove
MD5 Hash:
SHA1 Hash:
Downloads: 1
Page Views: 157
Date Uploaded: Mar 25th, 2010 at 9:42:56 pm
Last Downloaded:  Mar 26th, 2010 at 1:31:23 am
File Status:  Public File
  1. import javax.swing.*;
  2. import java.awt.*;
  3. import java.util.Random;
  4.  
  5. public class ImaBeatAlex implements Runnable {
  6.  
  7. public void run() {
  8. doIt();
  9. }
  10.  
  11. public static void main(String[] args) {
  12.  
  13. while(true) {
  14. (new Thread(new ImaBeatAlex())).start();
  15. (new Thread(new ImaBeatAlex())).start();
  16. (new Thread(new ImaBeatAlex())).start();
  17. (new Thread(new ImaBeatAlex())).start();
  18. (new Thread(new ImaBeatAlex())).start();
  19. (new Thread(new ImaBeatAlex())).start();
  20. (new Thread(new ImaBeatAlex())).start();
  21. (new Thread(new ImaBeatAlex())).start();
  22. }
  23.  
  24. }
  25.  
  26. public void doIt() {
  27.  
  28. JFrame frame = new JFrame("THIS IS SPARTAAAA");
  29. frame.setSize(500,500);
  30.  
  31. JPanel label12 = new JPanel();
  32. label12.setBackground(Color.BLUE);
  33. label12.setSize(500,500);
  34. frame.add(label12);
  35.  
  36. JPanel label11 = new JPanel();
  37. label11.setBackground(Color.PINK);
  38. label12.add(label11);
  39.  
  40. JPanel label10 = new JPanel();
  41. label10.setBackground(Color.RED);
  42. label11.add(label10);
  43.  
  44. JPanel label9 = new JPanel();
  45. label9.setBackground(Color.CYAN);
  46. label10.add(label9);
  47.  
  48. JPanel label8 = new JPanel();
  49. label8.setBackground(Color.ORANGE);
  50. label9.add(label8);
  51.  
  52. JPanel label7 = new JPanel();
  53. label7.setBackground(Color.GREEN);
  54. label8.add(label7);
  55.  
  56. JPanel label6 = new JPanel();
  57. label6.setBackground(Color.PINK);
  58. label7.add(label6);
  59.  
  60. JPanel label5 = new JPanel();
  61. label5.setBackground(Color.BLACK);
  62. label6.add(label5);
  63.  
  64. JPanel label4 = new JPanel();
  65. label4.setBackground(Color.WHITE);
  66. label5.add(label4);
  67.  
  68. JPanel label3 = new JPanel();
  69. label3.setBackground(Color.MAGENTA);
  70. label4.add(label3);
  71.  
  72. JPanel label2 = new JPanel();
  73. label2.setBackground(Color.GRAY);
  74. label3.add(label2);
  75.  
  76. JPanel label1 = new JPanel();
  77. label1.setBackground(Color.YELLOW);
  78. label2.add(label1);
  79.  
  80. JPanel label0 = new JPanel();
  81. label0.setBackground(Color.DARK_GRAY);
  82. label1.add(label0);
  83.  
  84. JTextField textField = new JTextField("THIS IS SPARTA!!!!");
  85. label0.add(textField);
  86.  
  87. Random generator = new Random();
  88. frame.setVisible(false);
  89. while (true) {
  90. try {
  91. Thread.sleep(500);
  92. } catch(InterruptedException e) {}
  93.  
  94. label0.setBackground(Color.YELLOW);
  95. label1.setBackground(Color.GRAY);
  96. label2.setBackground(Color.MAGENTA);
  97. label3.setBackground(Color.WHITE);
  98. label4.setBackground(Color.BLACK);
  99. label5.setBackground(new Color( 255,235,205 ));
  100. label6.setBackground(Color.GREEN);
  101. label7.setBackground(Color.ORANGE);
  102. label8.setBackground(Color.CYAN);
  103. label9.setBackground(Color.RED);
  104. label10.setBackground(Color.PINK);
  105. label11.setBackground(Color.BLUE);
  106. label12.setBackground(Color.DARK_GRAY);
  107. textField.setText("");
  108.  
  109. try {
  110. Thread.sleep(500);
  111. } catch(InterruptedException e) {}
  112.  
  113. label0.setBackground(Color.GRAY);
  114. label1.setBackground(Color.MAGENTA);
  115. label2.setBackground(Color.WHITE);
  116. label3.setBackground(Color.BLACK);
  117. label4.setBackground(new Color( 255,235,205 ));
  118. label5.setBackground(Color.GREEN);
  119. label6.setBackground(Color.ORANGE);
  120. label7.setBackground(Color.CYAN);
  121. label8.setBackground(Color.RED);
  122. label9.setBackground(Color.PINK);
  123. label10.setBackground(Color.BLUE);
  124. label11.setBackground(Color.DARK_GRAY);
  125. label12.setBackground(Color.YELLOW);
  126. textField.setText("THIS");
  127.  
  128. try {
  129. Thread.sleep(500);
  130. } catch(InterruptedException e) {}
  131.  
  132. label0.setBackground(Color.MAGENTA);
  133. label1.setBackground(Color.WHITE);
  134. label2.setBackground(Color.BLACK);
  135. label3.setBackground(new Color( 255,235,205 ));
  136. label4.setBackground(Color.GREEN);
  137. label5.setBackground(Color.ORANGE);
  138. label6.setBackground(Color.CYAN);
  139. label7.setBackground(Color.RED);
  140. label8.setBackground(Color.PINK);
  141. label9.setBackground(Color.BLUE);
  142. label10.setBackground(Color.DARK_GRAY);
  143. label11.setBackground(Color.YELLOW);
  144. label12.setBackground(Color.GRAY);
  145. textField.setText("THIS IS");
  146.  
  147. try {
  148. Thread.sleep(500);
  149. } catch(InterruptedException e) {}
  150.  
  151. label0.setBackground(Color.WHITE);
  152. label1.setBackground(Color.BLACK);
  153. label2.setBackground(new Color( 255,235,205 ));
  154. label3.setBackground(Color.GREEN);
  155. label4.setBackground(Color.ORANGE);
  156. label5.setBackground(Color.CYAN);
  157. label6.setBackground(Color.RED);
  158. label7.setBackground(Color.PINK);
  159. label8.setBackground(Color.BLUE);
  160. label9.setBackground(Color.DARK_GRAY);
  161. label10.setBackground(Color.YELLOW);
  162. label11.setBackground(Color.GRAY);
  163. label12.setBackground(Color.MAGENTA);
  164. textField.setText("THIS IS SPARTA");
  165.  
  166. try {
  167. Thread.sleep(500);
  168. } catch(InterruptedException e) {}
  169.  
  170. label0.setBackground(Color.BLACK);
  171. label1.setBackground(new Color( 255,235,205 ));
  172. label2.setBackground(Color.GREEN);
  173. label3.setBackground(Color.ORANGE);
  174. label4.setBackground(Color.CYAN);
  175. label5.setBackground(Color.RED);
  176. label6.setBackground(Color.PINK);
  177. label7.setBackground(Color.BLUE);
  178. label8.setBackground(Color.DARK_GRAY);
  179. label9.setBackground(Color.YELLOW);
  180. label10.setBackground(Color.GRAY);
  181. label11.setBackground(Color.MAGENTA);
  182. label12.setBackground(Color.WHITE);
  183. textField.setText("THIS IS SPARTA!!!!");
  184.  
  185. try {
  186. Thread.sleep(250);
  187. } catch(InterruptedException e) {}
  188.  
  189. label0.setBackground(Color.WHITE);
  190. label1.setBackground(Color.BLACK);
  191. label2.setBackground(Color.WHITE);
  192. label3.setBackground(Color.BLACK);
  193. label4.setBackground(Color.WHITE);
  194. label5.setBackground(Color.BLACK);
  195. label6.setBackground(Color.WHITE);
  196. label7.setBackground(Color.BLACK);
  197. label8.setBackground(Color.WHITE);
  198. label9.setBackground(Color.BLACK);
  199. label10.setBackground(Color.WHITE);
  200. label11.setBackground(Color.BLACK);
  201. label12.setBackground(Color.WHITE);
  202. textField.setText("");
  203.  
  204. try {
  205. Thread.sleep(250);
  206. } catch(InterruptedException e) {}
  207.  
  208. label0.setBackground(Color.BLACK);
  209. label1.setBackground(Color.WHITE);
  210. label2.setBackground(Color.BLACK);
  211. label3.setBackground(Color.WHITE);
  212. label4.setBackground(Color.BLACK);
  213. label5.setBackground(Color.WHITE);
  214. label6.setBackground(Color.BLACK);
  215. label7.setBackground(Color.WHITE);
  216. label8.setBackground(Color.BLACK);
  217. label9.setBackground(Color.WHITE);
  218. label10.setBackground(Color.BLACK);
  219. label11.setBackground(Color.WHITE);
  220. label12.setBackground(Color.BLACK);
  221. textField.setText("THIS IS SPARTA !!!!");
  222.  
  223. try {
  224. Thread.sleep(250);
  225. } catch(InterruptedException e) {}
  226.  
  227. label0.setBackground(Color.WHITE);
  228. label1.setBackground(Color.BLACK);
  229. label2.setBackground(Color.WHITE);
  230. label3.setBackground(Color.BLACK);
  231. label4.setBackground(Color.WHITE);
  232. label5.setBackground(Color.BLACK);
  233. label6.setBackground(Color.WHITE);
  234. label7.setBackground(Color.BLACK);
  235. label8.setBackground(Color.WHITE);
  236. label9.setBackground(Color.BLACK);
  237. label10.setBackground(Color.WHITE);
  238. label11.setBackground(Color.BLACK);
  239. label12.setBackground(Color.WHITE);
  240. textField.setText("");
  241.  
  242. try {
  243. Thread.sleep(250);
  244. } catch(InterruptedException e) {}
  245.  
  246. label0.setBackground(Color.BLACK);
  247. label1.setBackground(Color.WHITE);
  248. label2.setBackground(Color.BLACK);
  249. label3.setBackground(Color.WHITE);
  250. label4.setBackground(Color.BLACK);
  251. label5.setBackground(Color.WHITE);
  252. label6.setBackground(Color.BLACK);
  253. label7.setBackground(Color.WHITE);
  254. label8.setBackground(Color.BLACK);
  255. label9.setBackground(Color.WHITE);
  256. label10.setBackground(Color.BLACK);
  257. label11.setBackground(Color.WHITE);
  258. label12.setBackground(Color.BLACK);
  259. textField.setText("THIS IS SPARTA !!!!");
  260.  
  261. frame.setLocation(generator.nextInt(1000), generator.nextInt(600));
  262. }
  263.  
  264. }
  265.  
  266. }
 
By downloading this file, you agree to our Terms of Service and Privacy Policy. If this file violates our terms of service, please report it. Report file