Ver Mensaje Individual
  #4 (permalink)  
Antiguo 13/12/2011, 09:48
alexg88
 
Fecha de Ingreso: abril-2011
Mensajes: 1.342
Antigüedad: 13 años, 9 meses
Puntos: 344
Respuesta: error aplicación

No hace falta que crees la instancia de proyecto en un hilo aparte.

Código Java:
Ver original
  1. public static void main(String args[]) {
  2.         /* Set the Nimbus look and feel */
  3.         //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  4.         /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  5.          * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  6.          */
  7.         try {
  8.             for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
  9.                 if ("Nimbus".equals(info.getName())) {
  10.                     javax.swing.UIManager.setLookAndFeel(info.getClassName());
  11.                     break;
  12.                 }
  13.             }
  14.         } catch (ClassNotFoundException ex) {
  15.             java.util.logging.Logger.getLogger(proyecto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  16.         } catch (InstantiationException ex) {
  17.             java.util.logging.Logger.getLogger(proyecto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  18.         } catch (IllegalAccessException ex) {
  19.             java.util.logging.Logger.getLogger(proyecto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  20.         } catch (javax.swing.UnsupportedLookAndFeelException ex) {
  21.             java.util.logging.Logger.getLogger(proyecto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  22.         }
  23.         //</editor-fold>
  24.  
  25.      new proyecto().setVisible(true);
  26.                
  27.            
  28.     }