Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Opening a dialog from within a dialog(working with multiple dialogs)
Opening a dialog from within a dialog [message #1309448] Tue, 22 April 2014 18:05 Go to next message
Betsy Kramer is currently offline Betsy KramerFriend
Messages: 12
Registered: February 2014
Junior Member
I create a dialog that opens from a menu click. There is a button on the dialog that when clicked, opens a second dialog. It works but it places the second dialog behind the first and it isn't visible. Is there a way to make the second dialog come to the front?
Re: Opening a dialog from within a dialog [message #1309479 is a reply to message #1309448] Tue, 22 April 2014 18:30 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Well you probably want to pass the current dialog as the parent but
without showing us your current code I can't give you a better info.

Tom

On 22.04.14 20:05, Betsy Kramer wrote:
> I create a dialog that opens from a menu click. There is a button on
> the dialog that when clicked, opens a second dialog. It works but it
> places the second dialog behind the first and it isn't visible. Is there
> a way to make the second dialog come to the front?
Re: Opening a dialog from within a dialog [message #1309504 is a reply to message #1309479] Tue, 22 April 2014 18:47 Go to previous messageGo to next message
Betsy Kramer is currently offline Betsy KramerFriend
Messages: 12
Registered: February 2014
Junior Member
I thought of that but the efxclipse dialog class constructor requires the first argument to be the parent window and complains when I pass it the dialog as the parent. (MessageDialog extends Dialog)

Here is my code:

public MessageDialog(Window parent, String title) {
super(parent, title);
}
Re: Opening a dialog from within a dialog [message #1309518 is a reply to message #1309504] Tue, 22 April 2014 18:57 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
So you pass null?

You should get access to the window e.g. of the button by calling
button.getScene().getWindow() and pass that.

Tom

On 22.04.14 20:47, Betsy Kramer wrote:
> I thought of that but the efxclipse dialog class constructor requires
> the first argument to be the parent window and complains when I pass it
> the dialog as the parent. (MessageDialog extends Dialog)
>
> Here is my code:
>
> public MessageDialog(Window parent, String title) {
> super(parent, title); }
Re: Opening a dialog from within a dialog [message #1309532 is a reply to message #1309518] Tue, 22 April 2014 19:09 Go to previous message
Betsy Kramer is currently offline Betsy KramerFriend
Messages: 12
Registered: February 2014
Junior Member
Tom,
You are a genius! Thanks! Very Happy
Previous Topic:problem installing e(fx)clipse on my JUNO
Next Topic:javaFX in e4 vs Java application
Goto Forum:
  


Current Time: Thu May 09 08:55:22 GMT 2024

Powered by FUDForum. Page generated in 0.91300 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top