Normal
Tip 1) Klassennamen beginnt man mit einem GroßbuchstabenTip 2) Schau mal hier:[code=Java] public static void main (String [] args) { JFrame frame = new JFrame("test"); frame.setLocationRelativeTo(null); frame.setVisible(true); }[/code]Es geht aber auch:[code=Java] public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { JFrame frame = new JFrame("test"); frame.setLocationRelativeTo(null); frame.setVisible(true); } }); }[/code]
Tip 1) Klassennamen beginnt man mit einem Großbuchstaben
Tip 2) Schau mal hier:
[code=Java]
public static void main (String [] args) {
JFrame frame = new JFrame("test");
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
[/code]
Es geht aber auch:
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
});