Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- import java.awt.*;
- public class lol extends JFrame
- {
- // Creating the components + global variables
- ImageIcon[] array = new ImageIcon[51];{
- ImageIcon[0] array = new ImageIcon("6.png");
- }
- JLabel picture = new JLabel();
- //Creating the constructor for the class
- public lol()
- {
- // Creathe the compontents
- super("Combo Box");
- setSize(400,350);
- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- setVisible(true);
- Container content = getContentPane();
- content.add(picture);
- //setContentPane(content);
- setContentPane(content);
- picture.setIcon(array[51]);
- }
- public static void main (String[] args)
- {
- //Creating an instance of my class
- lol game = new lol();
- }
- }
- Exception in thread "main" java.lang.Error: Unresolved compilation problem:
- at lol.main(lol.java:33)
Add Comment
Please, Sign In to add comment