Screen2D.java common code