How to create an

Hi folks,

I'm having a weird problem to solve.

I have a JFrame, displaying some texts (JTextpane).

Now, I want to open a Search dialog, entering some word into its text field, press "Search" button of the dialog and set the caret to the first occurance in the text pane that is located in my JFrame.

But I don't want the dialog to dispose nor hide. It just shall lost its focus (because the JFrame has the focus now). Clicking on the dialog again should give it the focus for changing the search phrase or go on with search.

It's exactly the behaviour like the "Find" dialog in eclipse has.

Oh, and I'm stuck to use Java 1.4.2, any other version.

I played around with this a while and the best I can get is an always-on-top dialog WITH the focus. But I need to edit texts while displaying this dialog in JFrame, so it's not good enough.

I also can not position the dialog beneath the JFrame, because its full screen.

Can anybody help me? I nearly lost y nerve.

[1026 byte] By [thoto001a] at [2007-11-27 11:57:53]
# 1

Create a non-modal dialog and make sure you specify the frame as the owner.

camickra at 2007-7-29 19:16:31 > top of Java-index,Desktop,Core GUI APIs...