tags:

views:

31

answers:

0

why doesnt this work?, It keeps setting the label in the middle and the left side of this, what is wrong? Im a total begginer, sorry if this is too basic

package myfirstexample;
import javax.swing.JApplet;
import javax.swing.JLabel;

public class Main extends JApplet {
    @Override
    public void init(){
        setSize(500, 500);
        JLabel label = new JLabel("Hola Roger");
        label.setLocation(150, 150);
        add(label);
    }
}