Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.awt.Color;

public class Main {
    public static Color int2color(int x) {
        //        int[] out=new int[4];
        Color out = new Color(((x >>> 16) & 0xff), ((x >>> 8) & 0xff), ((x >>> 0) & 0xff), (~(x >>> 24) & 0xff));
        /*  out[3] =  ((x >>> 0) & 0xff); //b           
          out[2] =  ((x >>> 8) & 0xff);  //g
          out[1] =  ((x >>> 16) & 0xff);  //r
          out[0]=  ((x >>> 24) & 0xff);   //alpha */
        return out;
    }
}