/** @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(ManageAcces.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
      java.util.logging.Logger.getLogger(ManageAcces.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
      java.util.logging.Logger.getLogger(ManageAcces.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(ManageAcces.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    }
    // </editor-fold>

    /* Create and display the form */
    java.awt.EventQueue.invokeLater(
        () -> {
          new ManageAcces().setVisible(true);
        });
  }
  // <editor-fold defaultstate="collapsed" desc=" main ">
  public static void main(String args[]) {

    try {
      javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
    } catch (Exception e) {
      throw new RuntimeException(e);
    }

    Dlg_branch_locations dialog = Dlg_branch_locations.create(new javax.swing.JFrame(), true);
    dialog.setVisible(true);
  }
 static {
   try {
     javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
   } catch (Exception e) {
   }
 }
Exemple #4
0
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    m_jPanelTitle = new javax.swing.JPanel();
    m_jLblTitle = new javax.swing.JLabel();
    poweredby = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    m_jPanelContainer = new javax.swing.JPanel();
    m_jPanelLogin = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jPanel5 = new javax.swing.JPanel();
    m_jLogonName = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jPanel2 = new javax.swing.JPanel();
    jPanel8 = new javax.swing.JPanel();
    m_jClose = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    m_txtKeys = new javax.swing.JTextField();
    m_jPanelDown = new javax.swing.JPanel();
    panelTask = new javax.swing.JPanel();
    m_jHost = new javax.swing.JLabel();
    jPanel3 = new javax.swing.JPanel();

    setPreferredSize(new java.awt.Dimension(1024, 768));
    setLayout(new java.awt.BorderLayout());

    m_jPanelTitle.setBorder(
        javax.swing.BorderFactory.createMatteBorder(
            0, 0, 1, 0, javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")));
    m_jPanelTitle.setLayout(new java.awt.BorderLayout());

    m_jLblTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    m_jLblTitle.setText("Window.Title");
    m_jPanelTitle.add(m_jLblTitle, java.awt.BorderLayout.CENTER);

    poweredby.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/poweredby.png"))); // NOI18N
    poweredby.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 5));
    m_jPanelTitle.add(poweredby, java.awt.BorderLayout.LINE_END);

    jLabel2.setPreferredSize(new java.awt.Dimension(142, 34));
    m_jPanelTitle.add(jLabel2, java.awt.BorderLayout.LINE_START);

    add(m_jPanelTitle, java.awt.BorderLayout.NORTH);

    m_jPanelContainer.setLayout(new java.awt.CardLayout());

    m_jPanelLogin.setLayout(new java.awt.BorderLayout());

    jPanel4.setLayout(new javax.swing.BoxLayout(jPanel4, javax.swing.BoxLayout.Y_AXIS));

    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel1.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/logo.png"))); // NOI18N
    jLabel1.setText(
        "<html><center>SysNeo POS es un software de punto de venta intuitivo, de f&aacute;cil uso e ideal para las PyMes Peruanas.<br>"
            + "Copyright \u00A9 2012-2014 SysNeo POS, <br>"
            + "http://www.sysneoconsulting.com/ptoventa<br>"
            + "<br>"
            + "SysNeo POS est&aacute; basado en Openbravo POS, sistema de codigo abierto que mantiene los derechos bajo los t&eacute;minos de la GNU General Public License mantenido por la Free Software Foundation.<br>"
            + "<br>"
            + "SysNeo POS es ejecutado bajo autorización de uso y/o licencia de SysNeo Consulting.<br>"
            + "<br>"
            + "SysNeo Consulting, empresa responsable de SysNeo POS. http://www.sysneoconsulting.com<br>"
            + "</center>");
    jLabel1.setAlignmentX(0.5F);
    jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jLabel1.setMaximumSize(new java.awt.Dimension(800, 1024));
    jLabel1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jPanel4.add(jLabel1);

    m_jPanelLogin.add(jPanel4, java.awt.BorderLayout.CENTER);

    m_jLogonName.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
    m_jLogonName.setLayout(new java.awt.BorderLayout());

    jScrollPane1.setHorizontalScrollBarPolicy(
        javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    jScrollPane1.setVerticalScrollBarPolicy(
        javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
    jScrollPane1.setPreferredSize(new java.awt.Dimension(510, 118));
    m_jLogonName.add(jScrollPane1, java.awt.BorderLayout.CENTER);

    jPanel2.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 5));
    jPanel2.setLayout(new java.awt.BorderLayout());

    jPanel8.setLayout(new java.awt.GridLayout(0, 1, 5, 5));

    m_jClose.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/exit.png"))); // NOI18N
    m_jClose.setText(AppLocal.getIntString("Button.Close")); // NOI18N
    m_jClose.setFocusPainted(false);
    m_jClose.setFocusable(false);
    m_jClose.setPreferredSize(new java.awt.Dimension(115, 35));
    m_jClose.setRequestFocusEnabled(false);
    m_jClose.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jCloseActionPerformed(evt);
          }
        });
    jPanel8.add(m_jClose);

    jPanel2.add(jPanel8, java.awt.BorderLayout.NORTH);

    jPanel1.setLayout(null);

    m_txtKeys.setPreferredSize(new java.awt.Dimension(0, 0));
    m_txtKeys.addKeyListener(
        new java.awt.event.KeyAdapter() {
          public void keyTyped(java.awt.event.KeyEvent evt) {
            m_txtKeysKeyTyped(evt);
          }
        });
    jPanel1.add(m_txtKeys);
    m_txtKeys.setBounds(0, 0, 0, 0);

    jPanel2.add(jPanel1, java.awt.BorderLayout.CENTER);

    m_jLogonName.add(jPanel2, java.awt.BorderLayout.LINE_END);

    jPanel5.add(m_jLogonName);

    m_jPanelLogin.add(jPanel5, java.awt.BorderLayout.SOUTH);

    m_jPanelContainer.add(m_jPanelLogin, "login");

    add(m_jPanelContainer, java.awt.BorderLayout.CENTER);

    m_jPanelDown.setBorder(
        javax.swing.BorderFactory.createMatteBorder(
            1, 0, 0, 0, javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")));
    m_jPanelDown.setLayout(new java.awt.BorderLayout());

    m_jHost.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/display.png"))); // NOI18N
    m_jHost.setText("*Hostname");
    panelTask.add(m_jHost);

    m_jPanelDown.add(panelTask, java.awt.BorderLayout.LINE_START);
    m_jPanelDown.add(jPanel3, java.awt.BorderLayout.LINE_END);

    add(m_jPanelDown, java.awt.BorderLayout.SOUTH);
  } // </editor-fold>//GEN-END:initComponents
Exemple #5
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);
         }
       });
 }