T-Molding in Java