5024cfac4f
Conflicts: src/wuerfelthreads/Start.java src/wuerfelthreads/view/WuerfelView.form src/wuerfelthreads/view/WuerfelView.java
66 lines
1.4 KiB
Java
66 lines
1.4 KiB
Java
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|
|
package grafik;
|
|
|
|
import java.awt.Color;
|
|
import java.awt.Container;
|
|
import javax.swing.JFrame;
|
|
import javax.swing.JOptionPane;
|
|
import javax.swing.OverlayLayout;
|
|
import javax.swing.UIManager;
|
|
import javax.swing.WindowConstants;
|
|
|
|
/**
|
|
* Builder Class
|
|
* @author chris, hd
|
|
*/
|
|
public class Start
|
|
{
|
|
public Start()
|
|
{
|
|
JFrame frm = new JFrame();
|
|
Container con = frm.getContentPane();
|
|
con.setLayout(new OverlayLayout(con));
|
|
con.setBackground(Color.WHITE);
|
|
frm.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
|
|
|
|
|
// for (int i = 0; i < 100; i++)
|
|
// {
|
|
// double zufall = Math.random();
|
|
// long schlafzeit = (long)(1 + 100*zufall);
|
|
// Kreis leinwand = new Kreis(schlafzeit);
|
|
// leinwand.setOpaque(false);
|
|
// con.add(leinwand);
|
|
// leinwand.start();
|
|
// }
|
|
|
|
Gerade gerade = new Gerade(1);
|
|
con.add(gerade);
|
|
frm.setSize(600, 400);
|
|
frm.setVisible(true);
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
* @param args the command line arguments
|
|
*/
|
|
public static void main(String[] args)
|
|
{
|
|
try
|
|
{
|
|
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
JOptionPane.showMessageDialog(null, e.toString());
|
|
}
|
|
new Start();
|
|
}
|
|
}
|