Example #1
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);
         }
       });
 }
Example #2
0
 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();
   }
 }
 public static void main(String[] args) {
   try {
     javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
   } catch (Exception e) {
     e.printStackTrace();
   }
   BSInterface bs = new BSInterface();
 }
  /** @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(VagrantDeductor.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
      java.util.logging.Logger.getLogger(VagrantDeductor.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
      java.util.logging.Logger.getLogger(VagrantDeductor.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(VagrantDeductor.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() {
            new VagrantDeductor7installations().setVisible(false);
          }
        });
  }
Example #5
0
  /** Initializes the applet CmdTicket */
  @Override
  public void init() {
    /* 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(CmdTicket.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
      java.util.logging.Logger.getLogger(CmdTicket.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
      java.util.logging.Logger.getLogger(CmdTicket.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(CmdTicket.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    }
    // </editor-fold>

    /* Create and display the applet */
    try {
      java.awt.EventQueue.invokeAndWait(
          new Runnable() {
            public void run() {
              initComponents();
              RecupProjection(0);
            }
          });
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
Example #6
0
  // 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;
  }
Example #7
0
 static {
   try {
     javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
   } catch (Exception e) {
   }
 }