Java Swing Look and Feel setLookAndFeel(String lookAndFeelClass)

Here you can find the source of setLookAndFeel(String lookAndFeelClass)

Description

set Look And Feel

License

Open Source License

Declaration

private static boolean setLookAndFeel(String lookAndFeelClass) 

Method Source Code

//package com.java2s;
/**********************************************************************************************
 *
 * Asprise OCR Java API//  www  .  j a va2 s.  c o m
 * Copyright (C) 1998-2015. Asprise Inc. <asprise.com>
 *
 * This file is licensed under the GNU Affero General Public License version 3 as published by
 * the Free Software Foundation.
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the
 * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * You should have received a copy of the GNU Affero General Public License.  If not, please
 * visit <http://www.gnu.org/licenses/agpl-3.0.html>.
 *
 **********************************************************************************************/

import javax.swing.UIManager;

public class Main {
    private static boolean setLookAndFeel(String lookAndFeelClass) {
        try {
            UIManager.setLookAndFeel(lookAndFeelClass);
            return true;
        } catch (Throwable t) {
            System.err.println(t.getMessage());
            return false;
        }
    }
}

Related

  1. setLookAndFeel(Component comp, LookAndFeel lf)
  2. setLookAndFeel(final Class lookAndFeel)
  3. setLookAndFeel(String laf)
  4. setLookAndFeel(String lafName)
  5. setLookAndFeel(String look)
  6. setLookAndFeelByName(final String lookAndFeel)
  7. setLookAndTheme(LookAndFeel laf, Object theme)
  8. setMetalLAF()
  9. setMotifLookAndFeel()