preparation to rewrite GUI in java