Centering form

I'm creating a form (bbaaddd JFrame based, if anyone can offer something nicer, please do) for a goto mecanism.
As such, I'd like it to appear at the same place as other go to dialog appear, ie more or less center of editor window.
Can anyone point me at how to do that? (so, how to get editor window coordinates)
(since I'm in an action, I have access to the editor, this is not a problem)

2 comments
Comment actions Permalink

Hello Jonathan,

Your form should extend DialogWrapper.

I'm creating a form (bbaaddd JFrame based, if anyone can offer
something nicer, please do) for a goto mecanism.

As such, I'd like it to appear at the same place as other go to dialog
appear, ie more or less center of editor window.

Can anyone point me at how to do that? (so, how to get editor window
coordinates)

(since I'm in an action, I have access to the editor, this is not a
problem)


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thanks Dmitry. I had seen it but wronly assumed it wouldn't be possible to get rid of buttons..


0

Please sign in to leave a comment.