frame implementation more java5 version