Source Code : Platform specific functionality.

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Platform specific functionality.

      


import java.awt.Frame;
import java.lang.reflect.Method;

/**
 * Platform specific functionality.
 *
 * @author <a href="mailto:cam%40mcc%2eid%2eau">Cameron McCormack</a>
 * @version $Id: Platform.java 582434 2007-10-06 02:11:51Z cam $
 */
public abstract class Platform {

    /**
     * Whether we are running on Mac OS X.
     */
    public static boolean isOSX =
        System.getProperty("os.name").equals("Mac OS X");

    /**
     * Whether we are running on JRE 1.3.
     */
    public static boolean isJRE13 =
        System.getProperty("java.version").startsWith("1.3");

    /**
     * Unmaximizes the specified Frame.
     */
    public static void unmaximize(Frame f) {
        if (!isJRE13) {
            try {
                Method m1 =
                    Frame.class.getMethod("getExtendedState", (Class[]) null);
                Method m2 =
                    Frame.class.getMethod("setExtendedState",
                                          new Class[] { Integer.TYPE });
                int i = ((Integer) m1.invoke(f, (Object[]) null)).intValue();
                m2.invoke(f, new Object[] { new Integer(i & ~6) });
            } catch (java.lang.reflect.InvocationTargetException ite) {
            } catch (NoSuchMethodException nsme) {
            } catch (IllegalAccessException iae) {
            }
        }
    }
}

   
    
    
    
    
    
  

Thank with us