i was actually meaning not to do that and instead use 2 separate applications as is demoed in events/multiWindowExample but since you are calling setupGui right after seting app the gui window it should be ok, in any case it's preferable to do it the other way since it's much clear the separation between windows.
i'm trying the gui example with the programmable renderer (i can only test up to 3.2 but it should be the same) and it's working for me fine. what platform are you in?