public static void main(String[] args) {
   ClockWithAudioOnSeparateThread applet = new ClockWithAudioOnSeparateThread();
   applet.init();
   applet.start();
   JFrame frame = new JFrame();
   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   frame.setTitle("ClockWithAudioOnSeparateThread");
   frame.getContentPane().add(applet, BorderLayout.CENTER);
   frame.setSize(400, 320);
   frame.setVisible(true);
 }
Exemplo n.º 2
0
  public static void main(String args[]) {
    Component comp = new Component();
    System.out.println("Mineblock Development Console: ");
    System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
    System.out.println("Current Version: " + versionNumber);
    frame = new JFrame();
    frame.add(comp);
    frame.pack();

    realSize = new Dimension(frame.getWidth(), frame.getHeight());

    frame.setTitle(name + versionNumber);
    frame.setResizable(true);
    frame.setLocationRelativeTo(null);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
    comp.start();
  }