The two principal APIs for working with media formats in Java are
Suns JMF (Java Media Framework, which is no longer developed), and
Apples QuickTime. Numerous code examples are available for both of them.
If you're asking specifically about playing WMF files, though, then I think you're out of luck - neither QT nor JMF can play those, AFAIK.