/* * Created on 17.10.2005 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ /** * @author sven * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ import java.awt.*; import javax.swing.*; public class test extends JFrame{ Container c; JLabel beschrift; public test() { c = getContentPane(); c.setLayout(new FlowLayout()); beschrift = new JLabel ("Text im Frame"); c.add(beschrift); } public test(String[] labelText) { /** * @param labelText in */ c = getContentPane(); c.setLayout(new FlowLayout()); String LabelText=""; for (int i=1;i [] []"); } public Color getRandomColor() { Color myColor = new Color ((float) Math.random(),(float) Math.random(),(float) Math.random()); return myColor; } public static void main(String[] args) { test TestWinClass; if (args.length == 0) { TestWinClass = new test(); TestWinClass.hilfe(); } else { TestWinClass = new test(args); } TestWinClass.setTitle("Frame mit Text"); TestWinClass.setSize(300,150); TestWinClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); TestWinClass.setVisible(true); } }