When a Juce OSX app starts up that shows two desktop windows, one of the windows appears in the foreground and the other one appears behind other applications (instead of in front with the first window).
To replicate this, use IntroJucer and create a new project: GUI application with auto-create main.cpp and a basic window. Each place "mainWindow" is used, add a second window (e.g. mainWin2): initialise, shutdown, and member variables. The two windows should appear one on top of the other in front of other apps, but one appears in front and the other appears behind other applications.
I'm using Juce 3.1.1 on a Mac with OS 10.9.5.