aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to make Modality backword compatible? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to make Modality backword compatible?" Watch "How to make Modality backword compatible?" New topic
Author

How to make Modality backword compatible?

Ashwini Suneeth
Greenhorn

Joined: Dec 16, 2010
Posts: 3
Hi,
Our project uses both 1.5 and 1.6. 1.6 has this modality types like Dialog.ModalityType.DOCUMENT_MODAL which can be passed in as a argument in the Constructor specific to 1.6.
So , previous 1.5 constructor was just JDialog(Frame owner, String title, boolean modal) .
How can I make modality compatible with 1.5 ?
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3611
    
  60

Use only the methods available in 1.5.

The modality extension is specific to Java 1.6, it is not available in earlier releases. Not only the methods are missing in the API, the other needed library code is simply not there. If your application needs these new modes, it cannot be run on 1.5.

Maybe your application might test the JRE version and use the 1.6 features only when available, disallowing or limiting functions that cannot be fully implemented in 1.5; however, I've no idea how - or whether at all - is this doable.
Ashwini Suneeth
Greenhorn

Joined: Dec 16, 2010
Posts: 3
Thanks a lot Martin !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make Modality backword compatible?