Convertion Java to Processing