This behavior is reproducable with SuSE 10 and on Ubuntu 6.06. This is observed with java 6 and 7
I've a Frame(f1), an application modal dialog and a modal excluded Frame (f2). Once the Dialog is on top of the other two frames, calling toBack on dialog does not push the Dialog to the back of the modal excluded frame, the first time. When toBack is called again, the dialog goes to back.
To reproduce:
1. Run the attached testcase. It will show two frames
2. Click the button 'Show Dialog' - it will show the modal dialog
3. Now, click the 'Dialog ToBack' button on dialog
If the dialog does not go behind the right frame on first click and if it goes behind when clicked again, the bug is reproduced.