import java.awt.*; import java.awt.event.*; import javax.swing.*; class Mini { public static void main (String[] args) { try { UIManager.setLookAndFeel( UIManager.getCrossPlatformLookAndFeelClassName()); } catch (Exception e) { System.exit(1); } JFrame vindu = new JFrame("Xxx"); vindu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel panel = new JPanel(); vindu.add(panel); vindu.pack(); vindu.setLocationRelativeTo(null); vindu.setVisible(true); } }