• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to make Modality backword compatible?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Martin !
 
reply
    Bookmark Topic Watch Topic
  • New Topic