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); } }); }
public static void setPLAF(String s) { try { if (s.equals("TinyLAF")) { javax.swing.UIManager.setLookAndFeel("de.muntjak.tinylookandfeel.TinyLookAndFeel"); } else if (s.equals("JGoodiesLAF-PlasticXP")) { javax.swing.UIManager.setLookAndFeel("com.jgoodies.plaf.plastic.PlasticXPLookAndFeel"); } else if (s.equals("JGoodiesLAF-Plastic")) { javax.swing.UIManager.setLookAndFeel("com.jgoodies.plaf.plastic.PlasticLookAndFeel"); } else if (s.equals("JGoodiesLAF-Plastic3D")) { javax.swing.UIManager.setLookAndFeel("com.jgoodies.plaf.plastic.Plastic3DLookAndFeel"); } else if (s.equals("JGoodiesLAF-ExtWindows")) { javax.swing.UIManager.setLookAndFeel("com.jgoodies.plaf.windows.ExtWindowsLookAndFeel"); } else if (s.equals("System")) { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } else { javax.swing.UIManager.LookAndFeelInfo[] lfinfo = javax.swing.UIManager.getInstalledLookAndFeels(); for (int i = 0; i < lfinfo.length; ++i) { if (lfinfo[i].getName().equalsIgnoreCase(s)) { javax.swing.UIManager.setLookAndFeel(lfinfo[i].getClassName()); return; } } } } catch (Exception ex) { ex.printStackTrace(); } }
/** @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); }); }
// ErtanO 12.03.2004 public static java.util.List getAvailablePLAF() { java.util.List l = new java.util.ArrayList(); l.add("System"); l.add("TinyLAF"); l.add("JGoodiesLAF-PlasticXP"); l.add("JGoodiesLAF-Plastic"); l.add("JGoodiesLAF-Plastic3D"); l.add("JGoodiesLAF-ExtWindows"); javax.swing.UIManager.LookAndFeelInfo[] lfinfo = javax.swing.UIManager.getInstalledLookAndFeels(); for (int i = 0; i < lfinfo.length; ++i) { l.add(lfinfo[i].getName()); } return l; }
public static void setLookAndFeel(String name) { try { if (name.equals("PGS")) { UIManager.setLookAndFeel("com.pagosoft.plaf.PgsLookAndFeel"); } else { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if (name.equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Launcher.class.getName()) .log(java.util.logging.Level.SEVERE, null, ex); } }
/** @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); } }); }