Hi,I've made a simple example which shows the same thing in eclipse (tar/gziped the entire project). You can start the dialog either with a press on the pushbutton or via the menuitem selection - Start.java is the Application.
The behaviour, at least as it is for me, is that the modeless dialog is shown initially, but hidden behind the main frame after the menu is redrawn. This behaviour does not happen when using the pushbutton.
Cheers, Tomas On 10/16/2011 01:48 PM, Tomas Stenlund wrote:
Hi,no that does not seem to be it. I use the display to create the dialog, i.e. with no window owner. I don't think I can get a modeless dialog otherwise. I just for the fun of it wrote out the hashCode for the display I use in both cases and they hash to the same value.But I have too much additional code in here so I will try to make a barebone example and see wether or not that yields the same result.Cheers, Tomas On 10/16/2011 11:19 AM, Edvin Syse wrote:I think that source.getWindow() returns different results depending on where you call it from, and I think you need it to be your "main" window. I'm not sure this would be the best solution, but try saving a static reference to your main window somewhere and pass that to the dialog.open call and see if it solves your problem, then others might be able to shed some light as to why this happens.same time as the menus (graphically) are expanded and shown. But when the frame redraws the menu to hide the expansion as is the normalbehaviour when the mouse is clicked and released on a menu item the entireframe is put topmost in display order hiding my newly created modelessdialogbox. This is not what I want, since the user cannot start working on thisuntil the main frame is either moved or put backwards in displayorder.2) If I do exacly the same but from a Button in the main frame the modelessdialogbox stays as the topmost window.The same behaviour for both windows and linux, so I guess I must be doingsomething wrong here.
PivotTestbed.tar.gz
Description: GNU Zip compressed data
