import javax.swing.*;
import java.awt.*;

class MyFrame extends JFrame {
    public MyFrame(String s) {
        super(s);
        JLabel label = new JLabel("Welkom bij van C++ naar Java.");
        label.setFont(new Font("Arial", Font.BOLD, 24));
        getContentPane().setBackground(new Color(0x00BdBd));
        add(label);
        Double x=new Double(Math.random()*400);
        Double y=new Double(Math.random()*400);
        setLocation(x.intValue(), y.intValue());
        pack();
        setVisible(true);
    }
}
        
public class Welkom2a {
    public static void main(String[] args) {
        //see: http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
	    javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                JFrame frame1 = new MyFrame("Welkom!");
                frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                JFrame frame2 = new MyFrame("Ook welkom!");
            }
        });
    }
}
