import java.awt.*;
import javax.swing.*;
@SuppressWarnings("serial")
public class GUI extends JFrame{
private JPanel panel1 = new JPanel();
public GUI() {
ImageIcon bootingUp = new ImageIcon("bootscreen.png");
JLabel bootLabel = new JLabel(bootingUp);
panel1.add(bootLabel);
this.add(panel1);
Toolkit tools = Toolkit.getDefaultToolkit();
Dimension d = tools.getScreenSize();
this.setSize(d.width, d.height);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
this.setTitle("Game");
this.setResizable(false);
this.setBackground(Color.BLUE);
this.setForeground(Color.BLUE);
this.setVisible(true);
try {
Thread.sleep(5000);
} catch (InterruptedException e) {}
this.remove(bootLabel);
}
}
When the this.remove is called, nothing happens!
Oh, and the main method:
public class Begin {
/**
* @param args
*/
public static void main(String[] args) {
new GUI();
}
}
The this.setBackground and this.setForeground do nothing also.


Sign In
Create Account


Back to top









