All Downloads are FREE. Search and download functionalities are using the official Maven repository.

oms3.util.Graphics Maven / Gradle / Ivy

Go to download

Object Modeling System (OMS) is a pure Java object-oriented framework. OMS v3.+ is a highly interoperable and lightweight modeling framework for component-based model and simulation development on multiple platforms.

There is a newer version: 3.5.12
Show newest version
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package oms3.util;

import java.awt.GraphicsEnvironment;
import javax.swing.UIManager;

/**
 *
 * @author od
 */
public class Graphics {
    
    public static void nativeLF() {
        try {
            if (GraphicsEnvironment.isHeadless()) {
                return;
            }
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            String osName = System.getProperty("os.name");
            if ((osName != null) && osName.toLowerCase().startsWith("lin")) {
                UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
            }
        } catch (Exception E) {
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy