oms3.util.Graphics Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oms Show documentation
Show all versions of oms Show documentation
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.
/*
* 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