Guest User

Untitled

a guest
Jan 19th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. import javax.swing.*;
  2. import java.awt.*;
  3.  
  4. public class lol extends JFrame
  5. {
  6. // Creating the components + global variables
  7. ImageIcon[] array = new ImageIcon[51];{
  8. ImageIcon[0] array = new ImageIcon("6.png");
  9. }
  10. JLabel picture = new JLabel();
  11.  
  12. //Creating the constructor for the class
  13. public lol()
  14. {
  15. // Creathe the compontents
  16. super("Combo Box");
  17. setSize(400,350);
  18. setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  19. setVisible(true);
  20.  
  21.  
  22. Container content = getContentPane();
  23.  
  24. content.add(picture);
  25.  
  26. //setContentPane(content);
  27. setContentPane(content);
  28.  
  29. picture.setIcon(array[51]);
  30.  
  31. }
  32.  
  33. public static void main (String[] args)
  34. {
  35. //Creating an instance of my class
  36. lol game = new lol();
  37. }
  38.  
  39. }
  40.  
  41. Exception in thread "main" java.lang.Error: Unresolved compilation problem:
  42.  
  43. at lol.main(lol.java:33)
Add Comment
Please, Sign In to add comment