I know. But at this moment, I don't know which JDK the client uses. And if it is 1.3 of less, It won't compile. (throws a NoDefClassFound) Is there a way to catch it, so that this code is always save to use ?

You'll probably have to see what classes FocusTraversalPolicy deprecated and use them in place of it.

Grails Consultant
http://dangertree.net

Kurt Boets
Greenhorn

Joined: Oct 19, 2004
Posts: 14

posted Oct 19, 2004 07:22:00

0

I found the solution: Check it with reflexion.

I just added this code : Method methode = frame.getClass().getMethod("setFocusTraversalPolicy", new Class []{FocusTraversalPolicy.class} ); methode.invoke(frame, new Object [] {new MyFocus(getComponentOrder())}); And it works for JDK 1.3 + 1.4