예제 #1
0
 /**
  * Tell system to use native look and feel, as in previous releases. Metal (Java) LAF is the
  * default otherwise.
  */
 public static void setNativeLookAndFeel() {
   try {
     UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
   } catch (Exception e) {
     System.out.println("Error setting native LAF: " + e);
   }
 }
예제 #2
0
  /**
   * The first method that is called in the application (by Java).
   *
   * @param args The command line arguments.
   * @since 1.0.0
   */
  public static void main(String[] args) throws Exception {
    // set the look and feel to that of the current OS
    try {
      boolean nimbusfound = false;

      // Get system look
      final String SYSTEM_LOOK = UIManager.getSystemLookAndFeelClassName();

      UIManager.setLookAndFeel(SYSTEM_LOOK);
    } // End of try
    catch (Exception e) {
      e.printStackTrace();
      // Do nothing, use default java look
    } // End of catch

    new Login();
  } // End of main method