Example #1
0
  /** @param args the command line arguments */
  public static void main(String args[]) {
    /* Set the Nimbus look and feel */
    // <editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
     * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
     */
    try {
      for (javax.swing.UIManager.LookAndFeelInfo info :
          javax.swing.UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
          javax.swing.UIManager.setLookAndFeel(info.getClassName());
          break;
        }
      }
    } catch (ClassNotFoundException ex) {
      java.util.logging.Logger.getLogger(LoginJFrame.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
      java.util.logging.Logger.getLogger(LoginJFrame.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
      java.util.logging.Logger.getLogger(LoginJFrame.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(LoginJFrame.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    }
    // </editor-fold>

  }
  /** @param args the command line arguments */
  public static void main(String args[]) {
    /*
     * Set the Nimbus look and feel
     */
    // <editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /*
     * If Nimbus (introduced in Java SE 6) is not available, stay with the
     * default look and feel. For details see
     * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
     */
    try {
      for (javax.swing.UIManager.LookAndFeelInfo info :
          javax.swing.UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
          javax.swing.UIManager.setLookAndFeel(info.getClassName());
          break;
        }
      }
    } catch (ClassNotFoundException ex) {
      java.util.logging.Logger.getLogger(MensagemConfirmaExclusaoSequenciaProducao.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
      java.util.logging.Logger.getLogger(MensagemConfirmaExclusaoSequenciaProducao.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
      java.util.logging.Logger.getLogger(MensagemConfirmaExclusaoSequenciaProducao.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(MensagemConfirmaExclusaoSequenciaProducao.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    }
    // </editor-fold>

    /*
     * Create and display the dialog
     */
    java.awt.EventQueue.invokeLater(
        new Runnable() {

          public void run() {
            MensagemConfirmaExclusaoSequenciaProducao dialog =
                new MensagemConfirmaExclusaoSequenciaProducao(new javax.swing.JFrame(), true);
            dialog.addWindowListener(
                new java.awt.event.WindowAdapter() {

                  @Override
                  public void windowClosing(java.awt.event.WindowEvent e) {
                    System.exit(0);
                  }
                });
            dialog.setVisible(true);
          }
        });
  }
Example #3
0
 public static void main(String args[]) {
   try {
     for (javax.swing.UIManager.LookAndFeelInfo info :
         javax.swing.UIManager.getInstalledLookAndFeels()) {
       if ("Nimbus".equals(info.getName())) {
         javax.swing.UIManager.setLookAndFeel(info.getClassName());
         break;
       }
     }
   } catch (ClassNotFoundException
       | InstantiationException
       | IllegalAccessException
       | javax.swing.UnsupportedLookAndFeelException ex) {
     java.util.logging.Logger.getLogger(Options.class.getName())
         .log(java.util.logging.Level.SEVERE, null, ex);
   }
   /* Create and display the form */
   java.awt.EventQueue.invokeLater(
       new Runnable() {
         @Override
         public void run() {
           new Options().setVisible(true);
         }
       });
 }
  /** @param args the command line arguments */
  public static void main(String args[]) {
    /* Set the Nimbus look and feel */
    // <editor-fold defaultstate="collapsed"
    // desc=" Look and feel setting code (optional) ">
    /*
     * If Nimbus (introduced in Java SE 6) is not available, stay with the
     * default look and feel. For details see
     * http://download.oracle.com/javase
     * /tutorial/uiswing/lookandfeel/plaf.html
     */
    try {
      for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
          UIManager.setLookAndFeel(info.getClassName());
          break;
        }
      }
    } catch (ClassNotFoundException ex) {
      java.util.logging.Logger.getLogger(MathGenerator.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
      java.util.logging.Logger.getLogger(MathGenerator.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
      java.util.logging.Logger.getLogger(MathGenerator.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(MathGenerator.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    }
    // </editor-fold>

    /* Create and display the form, setting a new Round */
    java.awt.EventQueue.invokeLater(
        new Runnable() {
          public void run() {
            MathGenerator mg = new MathGenerator();
            mg.setVisible(true);
            mg.operationComBox.setSelectedIndex(0);
            mg.resetProblems();
          }
        });
  }
Example #5
0
  public static void startGui(MusicLibraryAgent musicLibraryAgent) {
    /* Set the Nimbus look and feel */
    // <editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
     * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
     */
    try {
      for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
        if ("Windows".equals(info.getName())) {
          UIManager.setLookAndFeel(info.getClassName());
          break;
        }
      }
    } catch (ClassNotFoundException ex) {
      java.util.logging.Logger.getLogger(MainFrame.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
      java.util.logging.Logger.getLogger(MainFrame.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
      java.util.logging.Logger.getLogger(MainFrame.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(MainFrame.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    }
    // </editor-fold>

    fc.setMultiSelectionEnabled(true);
    fc.setCurrentDirectory(new File("D:"));
    final MainFrame mainFrame = new MainFrame(musicLibraryAgent);

    /* Create and display the form */
    java.awt.EventQueue.invokeLater(
        new Runnable() {
          public void run() {
            mainFrame.setVisible(true);
          }
        });
  }
  /** @param args the command line arguments */
  public static void main(String args[]) {
    /*
     * Set the Nimbus look and feel
     */
    // <editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /*
     * If Nimbus (introduced in Java SE 6) is not available, stay with the
     * default look and feel. For details see
     * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
     */
    try {
      for (javax.swing.UIManager.LookAndFeelInfo info :
          javax.swing.UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
          javax.swing.UIManager.setLookAndFeel(info.getClassName());
          break;
        }
      }
    } catch (ClassNotFoundException
        | InstantiationException
        | IllegalAccessException
        | javax.swing.UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(Lcr.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    }
    // </editor-fold>

    /*
     * Create and display the form
     */
    java.awt.EventQueue.invokeLater(
        new Runnable() {

          @Override
          public void run() {
            new Lcr().setVisible(true);
          }
        });
  }
Example #7
0
  /** @param args the command line arguments */
  public static void main(String[] args) {
    try {
      for (javax.swing.UIManager.LookAndFeelInfo info :
          javax.swing.UIManager.getInstalledLookAndFeels()) {
        /*
        if ("Nimbus".equals(info.getName())) {
            javax.swing.UIManager.setLookAndFeel(info.getClassName());
            break;
        }
        */
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
      }
    } catch (ClassNotFoundException
        | InstantiationException
        | IllegalAccessException
        | javax.swing.UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(LoadingDialog.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    }

    java.awt.EventQueue.invokeLater(new XCOMSGE());
  }
  /** @param args the command line arguments */
  public static void main(String args[]) {

    /*
     * Set the Nimbus look and feel
     */
    // <editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /*
     * If Nimbus (introduced in Java SE 6) is not available, stay with the
     * default look and feel. For details see
     * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
     */
    try {
      for (javax.swing.UIManager.LookAndFeelInfo info :
          javax.swing.UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
          javax.swing.UIManager.setLookAndFeel(info.getClassName());
          break;
        }
      }
    } catch (ClassNotFoundException ex) {
      java.util.logging.Logger.getLogger(Frame.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
      java.util.logging.Logger.getLogger(Frame.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
      java.util.logging.Logger.getLogger(Frame.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(Frame.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    }
    // </editor-fold>

    /*
     * Create and display the form
     */
    java.awt.EventQueue.invokeLater(
        new Runnable() {

          public void run() {
            Environment env = new Environment();
            DiskArray diskArray01 = new DiskArray();
            diskArray01.setVolumes(new ArrayList<Volume>());
            diskArray01.setEnvironment(env);
            DiskArray diskArray02 = new DiskArray();
            diskArray02.setVolumes(new ArrayList<Volume>());
            diskArray02.setEnvironment(env);

            env.setDiskArrays(new ArrayList<DiskArray>());
            env.getDiskArrays().add(diskArray01);
            env.getDiskArrays().add(diskArray02);

            Volume vol01 = new Volume();
            vol01.setName("vol01");
            vol01.setCapacity(10000000000L);
            vol01.setUsedrate(80.0);
            vol01.setDiskArray(diskArray01);
            Volume vol02 = new Volume();
            vol02.setName("vol02");
            vol02.setCapacity(20000000000L);
            vol02.setUsedrate(50.0);
            vol02.setDiskArray(diskArray01);

            diskArray01.getVolumes().add(vol01);
            diskArray01.getVolumes().add(vol02);
            diskArray01.setName("ETERNUS 410");
            diskArray01.setIpAddress("xx.xx.xx.xx");

            Volume vol03 = new Volume();
            vol03.setName("vol01");
            vol03.setCapacity(10000000000L);
            vol03.setUsedrate(80.0);
            vol03.setDiskArray(diskArray01);
            Volume vol04 = new Volume();
            vol04.setName("vol02");
            vol04.setCapacity(20000000000L);
            vol04.setUsedrate(50.0);
            vol04.setDiskArray(diskArray01);

            diskArray02.getVolumes().add(vol03);
            diskArray02.getVolumes().add(vol04);
            diskArray02.setName("ETERNUS 440");
            diskArray02.setIpAddress("yy.yy.yy.yy");

            Navigator navigator = new Navigator(env);
            MainPanel mainPanel = new MainPanel();

            new Frame(navigator, mainPanel).setVisible(true);
          }
        });
  }
Example #9
0
 /** @param args the command line arguments */
 public static void main(String args[]) {
   /* Set the Nimbus look and feel */
   // <editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
   /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
    * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
    */
   try {
     for (javax.swing.UIManager.LookAndFeelInfo info :
         javax.swing.UIManager.getInstalledLookAndFeels()) {
       if ("Nimbus".equals(info.getName())) {
         javax.swing.UIManager.setLookAndFeel(info.getClassName());
         break;
       }
     }
   } catch (ClassNotFoundException ex) {
     java.util.logging.Logger.getLogger(FrameLogin.class.getName())
         .log(java.util.logging.Level.SEVERE, null, ex);
   } catch (InstantiationException ex) {
     java.util.logging.Logger.getLogger(FrameLogin.class.getName())
         .log(java.util.logging.Level.SEVERE, null, ex);
   } catch (IllegalAccessException ex) {
     java.util.logging.Logger.getLogger(FrameLogin.class.getName())
         .log(java.util.logging.Level.SEVERE, null, ex);
   } catch (javax.swing.UnsupportedLookAndFeelException ex) {
     java.util.logging.Logger.getLogger(FrameLogin.class.getName())
         .log(java.util.logging.Level.SEVERE, null, ex);
   }
   // </editor-fold>
   /*try {
       String host = "jdbc:mysql://localhost:3306/2761DB";
       String uname = "root";
       String upassword = "******";
       Connection con = DriverManager.getConnection(host, uname, upassword );
       String SQL = "SELECT * FROM Persons";
       Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
       ResultSet rs = stmt.executeQuery( SQL );
       while(rs.next()){
           String firstName = rs.getString("FirstName");
           String lastName = rs.getString("LastName");
           int personId = rs.getInt("PersonId");
           String firstName = rs.getString("FirstName");
           String lastName = rs.getString("LastName");
           int cellPhone = rs.getInt("CellPhoneNo");
           int homePhone = rs.getInt("HomePhoneNo");
           int schoolId = rs.getInt("SchoolId");
           int grade = rs.getInt("Grad"
                   + "e");
           System.out.println(personId + " " + firstName + " " + lastName + " " + cellPhone + " " + homePhone + " " + schoolId + " " + grade);
       }
   } catch (SQLException err) {
       System.out.println( err.getMessage( ) );
   }*/
   /* Create and display the form */
   java.awt.EventQueue.invokeLater(
       new Runnable() {
         public void run() {
           JFrame FrameLogin = new FrameLogin();
           // FrameLogin.setExtendedState(JFrame.MAXIMIZED_BOTH);
           FrameLogin.setVisible(true);
         }
       });
 }