OpenRocket file dialog on Mac

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Rich Holmes

Well-Known Member
Joined
Jul 24, 2013
Messages
720
Reaction score
2
I don't really know anything about Java development, and in particular about implementing platform-specific features in a cross-platform application, but is there any way the file dialogs in OpenRocket can be made (when run on a Mac) to be more Mac-like? See this: https://developer.apple.com/library...ormIntegration/NativePlatformIntegration.html in the section "File-Choosing Dialogs" which may or may not be relevant.
 
Rich,

The way I read this Apple document is java applications on mac now require a special structure in order to be viewed as a regular application. This means to OR that we would need to distribute a "mac" version and an "everyone else" version of essentially the same code. Honestly, I think it was pretty crappy that Apple decided to go this route rather than just package all this extra meta information within a "normal" location like the jar's META-INF/MANIFEST.MF file.

I've heard there might be other problems with the Apple JRE which causes the OR dialogs and windows to have too much padding as well. If possible try using the Oracle JRE instead or downgrade to Apple's 1.6 JRE.

Kevin
 
Kevin -

I think Rich's specific point is about the file choosing dialogs. The recommendation by Apple is to use java.awt.FileDialog instead of javax.swing.JFileChooser - which a quick scan of the code shows about 17 occurrences.

Doug
 
Hi,

I just tested and on Linux as well FileDialog uses the native file dialog, while JFileChooser imitates a GTK file selector from the 90's. FileDialog is, however, much more limited in terms of the API. We'll have to see if we can switch to using that.

Cheers,
Sampo N.
 
Back
Top