Open a new scene inside another one

Hi All
I am newbie in javafx and I am developing an application based on ensemble example. I made a scene (indicators) with some objects and I need to connect to oracle to complete this scene. I have created a class with a scene (login) that connects to database (typing user and password). The login scene runs a connection method to oracle that returns connection object. After this connection is successful, I will use this object into indicators scene.
How can I "call" the login scene from indicators class?
Are there any special thing I have to do with use a connection object in indicators class?
Sorry if it looks like too simple, but I did not find any tip about it.
Thank you for any help
Ricardo

Declaration first your new class inside private void init (final Stage s) or inside class, after that you can call like this in action button.
final Class_After_Login cal = new Class_After_Login();
b1.setOnAction(new EventHandler<ActionEvent>()
                        @Override public void handle(ActionEvent e)
                                if(e.getSource()== b1)
                                        try
                                                  cal.start(s); // This Syntax like this
                                                 Class.forName ("com.mysql.jdbc.Driver");
                                                 Connection c = DriverManager.getConnection("jdbc:mysql://localhost/mahasiswa","root","");  
                                                 Statement s = c.createStatement();
                                                 String sql =("select * from login where username='"+tf.getText()+"'and password='"+pf.getText().toString()+"'");
                                                 ResultSet rs= s.executeQuery(sql);
                                                 if(rs.next())
                                                        JOptionPane.showMessageDialog(null, "Login Berhasil");
                                                 else
                                                        JOptionPane.showMessageDialog(null, "Username atau Password SALAH");
                                        catch (Exception ex)
                                                //Logger.getLogger(Menu_Utama.class.getName()).log(Level.SEVERE, null, ex);
                    });Edited by: Tom on Feb 12, 2012 6:22 PM

Similar Messages

  • I can only open one Firefox browser window. When I click the firefox icon from desktop or taskbar to open up another browser window it does not open. I am ablt to open up new tabs within the one window.

    I can only open one Firefox browser window. When I click the firefox icon from desktop or taskbar to open up another browser window it does not open. I am ablt to open up new tabs within the one window.

    Have you tried: click Firefox button > New Tab > New Window '''''OR''''' CTRL+N '''''OR''''' File > New Window (if using the Menu Bar)
    Once open, Firefox locks the Profile that is in use and you can not open another window with that Firefox version and Profile combination using the Windows Desktop icon or the Windows Programs list.

  • How to open a new SESSION in another SESSION

    Hi!
    I would like to start a transaction in the current session (session 1); I want to open a new session (session 2), execute some updates, do the COMMIT (without commiting the data of the session 1) and close the session 2.
    I'm using JSPs and Data Web Beans.
    How can I open and close a new session?
    I would appreciate an answer?
    Thank you.

    hi,
    You can try to create another properties file only for that session. Then you instantiate the bean, that you want to create the new session, with that new properties file and i think a new session will be created. But im not sure .....
    Bye,
    RB
    P.S.: by the way, what does APAF stands for???
    null

  • Place one IDML file inside another one.

    I want to place one or more IDML files into another single IDML "master" file.
    The master file is sort of a template for a site layout. The IDML files I need to embed represent single content boxes with specific layouts. The files for those content boxes are created outside of InDesign with some texts I get from a database.
    To retain those layouts I deemed it best to just place them into another document which is no problem with INDD but just with IDML.
    I managed to link multiple INDD files into the master file in InDesign itself, but can not figure out how to link IDML files. I also found that it is possible to link INDD files into IDML files, just not IDML into IDML.
    I need to be working with IDML as opposed to INDD because I have to be able to manipulate the files in an easy way outside of InDesign.
    Is there any way to link IDML files into other IDML files? Or if not, is there a possibility to convert my IDML files to INDD files without having to use a real instance of InDesign?
    Relevant Lines of code from the master IDML file taken from the Spread.xml file:
    <Link Self="u9f81" AssetURL="$ID/" AssetID="$ID/" LinkResourceURI="file:/path/to/subtemplates/box2.idml" LinkResourceFormat="$ID/InDesign Format Name" StoredState="Normal" LinkClassID="35906" LinkClientID="257" LinkResourceModified="false" LinkObjectModified="false" ShowInUI="true" CanEmbed="true" CanUnembed="true" CanPackage="true" ImportPolicy="NoAutoImport" ExportPolicy="NoAutoExport" LinkImportStamp="file 130505142560000000 1396736" LinkImportModificationTime="2014-07-22T16:50:56" LinkImportTime="2014-07-23T11:42:22" LinkResourceSize="0~155000" />
    If I leave this in and try to open the file in InDesign I get the error message that the linked file type is not supported
    <Link Self="u9f81" AssetURL="$ID/" AssetID="$ID/" LinkResourceURI="file:/path/to/subtemplates/box1.indd" LinkResourceFormat="$ID/InDesign Format Name" StoredState="Normal" LinkClassID="35906" LinkClientID="257" LinkResourceModified="false" LinkObjectModified="false" ShowInUI="true" CanEmbed="true" CanUnembed="true" CanPackage="true" ImportPolicy="NoAutoImport" ExportPolicy="NoAutoExport" LinkImportStamp="file 130505142560000000 1396736" LinkImportModificationTime="2014-07-22T16:50:56" LinkImportTime="2014-07-23T11:42:22" LinkResourceSize="0~155000" />
    If I put this in everything works fine.
    Notes: box1.indd and box2.idml are the exact same files, just saved differently by InDesign. The path to both files is a valid file system path and has full read/write access.

    Thank you for your reply. I already know that it is possible to edit IDML files, which is what I am already doing.
    What I am now looking for is a way to place one IDML file into another one like you are able to do with INDD files.
    Which file format should I use insted then? It must be editable outside of InDesign because I need to be able to change texts and stylings within the file.
    Laubender
    That possibly means you have to have InDesign Server to integrate in your workflow.
    That's the exact thing I am trying to avoid here.

  • Firefox opens in new window under current one

    whenever I right-click on a link and select to open in a new window, the resulting new window always disappears under the current one. I am finding this to be rather annoying as I am used to the window opening in front of the previous one, meaning I didn't have to go chasing it in the taskbar icons.
    I can't say for sure when it started happening, but I'm thinking since a previous update.
    I have had a look under options, but can't find anything relating to it.
    how do I fix this annoyance?

    Surebrec,
    '''Update:''' I found this, which you might want to try out before continuing reading: http://www.techsupportalert.com/content/how-stop-firefox-stealing-window-focus.htm
    Basically that would mean the reverse for you.
    If that didn't work:
    Does this problem appear without you having many applications running at the same time and/or if you have pinned a lot of applications to your Taskbar in Wondows 7?
    Some users have reported that this problem manifests itself if the row of icons in the Taskbar simply can't make room for any icons expanding (i.e. new windows in for instance Mozilla Firefox or Internet Explorer).
    If so, you might want to take a look at: http://support.mozilla.org/en-US/kb/reset-firefox-easily-fix-most-problems

  • Can I open a new website inside a lightbox?

    Hi.
    I'm struggeling with how to setup the best eCommerce plan in Muse for my customer. I think I will go for Shopify's soulution because they have the right payment gateway for me as an scandinavian ... Wazala has only paypal. But I really want to integrate the Shopify url inside muse so that when the user press a SHOP NOW button a lightbox opens with the Shopifypage within .... is this possible?
    The sad thing is that I don't think I can implement the HTML code like you can with the Wazala soulution.

    That is an interesting idea, however shopfly is pretty much an all in one solution so trying to put an ecommerce website into another website is pretty much redudant. Wazala is a little different because it isn't a complete ecommerce website. It is an embeddable shop. You can also try cashiecommerce.com. It is free to use and try and allows a lot of customization for embedding into Muse. There is also Ecwid.com.

  • Creation of zip file inside another one.

    Hi,
    I have a problem  with the zip file creation.
    I have created the zip file but now i can' t
    create another zip file inside the first one.
    can you suggest me how can i do it ?
    thanks  Laura.

    Hi,
    try this Fm..
    ISM_GENERATE_ZIP_FILE_NAME
    Arunima

  • Help with calling a java application from inside another one

    Hello!
    I am having this problem which is getting on my nerves and dont know how to solve..
    I want to call from my java application, another java application. So i use the exec command. Then i want to read the output of this execution from my own application, (the "parent" process).
    But it doesn work properly. Something seems to happen and i dont get the whole output.
    The java program i want to call is created for running an application created with Matlab java builder.
    This program works when called from cmd, but seems not to work when called from inside a java application.
    The code of my java application is:
    Runtime rt = Runtime.getRuntime();
    Process child;
    // The java class getmagic is a special kind of java file that uses classes that work in matlab. It uses a component (.jar) file that is created from matlab java builder. thats why it wants the -classpath and the rest options.
    //I hope you wont get messed up in here.
    String[] callAndArgs = {"java","-classpath",".;C:\\Program Files\\MATLAB\\R2006b\\toolbox\\javabuilder\\jar\\javabuilder.jar;..\\MagicDemoComp\\magicsquare\\distrib\\magicsquare.jar -Djava.library.path=C:\\Program Files\\MATLAB\\R2006b\\bin\\win32;","getmagic","4"};
    try{
    child = rt.exec(callAndArgs);
    InputStream is = child.getInputStream();
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line;
    while ((line = br.readLine()) != null)
    System.out.println(line);
    is.close();
    System.out.println(child.waitFor());
    System.out.println("Finished");
    }catch(IOException e) {
    System.err.println("IOException starting process!");
    }catch(InterruptedException e) {
    System.err.println("InterruptedException starting process!");
    The java program (getmagic) thats uses matlab gives the following output (after some time) when called in cmd with argument 4
    Magic square of order 4
    16 2 3 13
    5 11 10 8
    9 7 6 12
    4 14 15 1
    My program shown above only prints:
    Magic square of order 4
    1
    Finished.
    Do i do something wrong? How can i get the rest of the output???
    Thank you very much in advance,
    Stacey
    PS: I am sorry for the length of my post.

    Hello CaptainMorgan08, thanx for the instant reply.
    I tried, but no, i cant.
    Because i cannot include this java aplication that uses matlab into my application, cause 1) it needs special arguments in the compiler and during execution so it can be run and 2) it uses classes that java doesnt have. only the java-like matlab code.
    For example it uses:
    import com.mathworks.toolbox.javabuilder.*;
    import magicsquare.*; //the component which is made from matlab java builder.
    So i cannot compile it with my application!
    If you know of a way, please let me know!
    I know i might be missing something.. something that is obvious to you.. but i ve been working days=nights hardly no sleep..so you can excuse me if i say something foolish..
    Message was edited by:
    Stacey_Gr

  • How do i open 2 tabs at the same time, whenever i want to open a new tab, the other one disappears and i cant get both at the same time

    opening 2 tabs at the same time

    Hello Sandy.
    Although possibly not related to your problem, I have to remind you that the version of Firefox you are using at the moment has been discontinued and is no longer supported. On top of this, it has known unpatched bugs and security problems. I urge you to update to the latest version of Firefox, for maximum security, stability, performance and usability. You can get it for free, as always, at [http://www.getfirefox.com getfirefox.com].
    As for your problem, make sure your instructing Firefox to open the link in a new tab. For example, middle-clicking (pressing the mouse wheel or the central button of the mouse) the link will open it in a new tab.
    If that doesn't help, it's possible that you are having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?
    Whenever you have a problem with Firefox, whatever it is, you should make sure it's not caused by one (or more than one) of your installed add-ons, be it an extension, a theme or a plugin. To do that easily and cleanly, run Firefox in [http://support.mozilla.com/en-US/kb/Safe+Mode safe mode] (don't forget to select ''Disable all add-ons'' when you start safe mode). If the problem disappears, you know it's from an add-on. Disable them all in normal mode, and enable them one at a time until you find the source of the problem. See [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes this article] for information about troubleshooting extensions and theme and [https://support.mozilla.com/en-US/kb/Troubleshooting+plugins this one] for plugins.
    If you need support for one of your add-ons, you'll have to contact its author.

  • How to open a form and close another one

    hi,
    I wish to open a form from another, and then close the calling form. In other words, having FORM1 and FORM2, FORM1 should do this:
    OPEN_FORM ('FORM2',ACTIVATE,SESSION);
    EXIT_FORM(NO_COMMIT,NO_VALIDATE);
    but I cant get this to work. As FORM1 is modal, it opens FORM2 but its still open. Changing the order of the two statements only cause FORM1 to be closed. Can I perform the two operations from within FORM1, avoiding to put the EXIT_FORM statement in FORM2?
    thank you

    Hello,
    Use NEW_FORM to replace the calling module.
    Francois

  • Is it ossible to have FF support DHTML? AND also change it so that it would open a 'text area' INSIDE another 'text area? Anyway, how come it lack support for DHTML?

    When I opened a walkthrough on the game 'Thief', it was written with DHTML, and the author correctly warned me that my browser, i.e. FireFox5, does not support DHTML, and that was the reason I was reading ALL of the hyperlinked paragraphs at once, instead that having them collapsed and only expanded when I clicked the links; not much of a problem; but he warned me that also some of the links redirected to material in other pages, so I was unable to access them, for the same reason: FireFox does not support DHTML. It seem odd to me, given that DHTML is a fairly common script, and old too! Is there any particular reason for this lacking? And there is some other one? I noticed that also with other not so common features, Firefox is missing something, sometime. Thanks so much for any response, and also I would like to see some sort of tech manual on this and other issues, explained.
    All the best, apart from these problems, FF is really stunning.

    When I opened a walkthrough on the game 'Thief', it was written with DHTML, and the author correctly warned me that my browser, i.e. FireFox5, does not support DHTML, and that was the reason I was reading ALL of the hyperlinked paragraphs at once, instead that having them collapsed and only expanded when I clicked the links; not much of a problem; but he warned me that also some of the links redirected to material in other pages, so I was unable to access them, for the same reason: FireFox does not support DHTML. It seem odd to me, given that DHTML is a fairly common script, and old too! Is there any particular reason for this lacking? And there is some other one? I noticed that also with other not so common features, Firefox is missing something, sometime. Thanks so much for any response, and also I would like to see some sort of tech manual on this and other issues, explained.
    All the best, apart from these problems, FF is really stunning.

  • How i can open a new command prompt from one java from

    hi
    can any one help me that how i can open a command prompt by using the java program file .
    regards,
    ukbasak

    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#exec(java.lang.String)
    and several overloads.
    Also
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ProcessBuilder.html

  • When i open a new tab, the previuos one do not respond. If i close this new tab, the older one works fine again

    I have latest version of Firefox, and Windows XP SP2

    Try to use the SearchReset extension to reset some preferences to the default values.
    *https://addons.mozilla.org/firefox/addon/searchreset/
    Note that the SearchReset extension only runs once and then uninstalls automatically, so it won't show on the "Firefox > Add-ons" page (about:addons).
    See also this article about the New Tab page (about:newtab):
    *https://support.mozilla.org/kb/new-tab-page-show-hide-and-customize-top-sites

  • No tabs are showing when only one window open. How do I open a new tab?

    Just upgraded to latest version. When only one window is open, no tabs show across the top. If I have two tabs open, both show across the top, but go to no tabs if I close one of them. And, the + sign is available for opening a third tab if at least two are open. The only way I can find to open a new tab when only one window is currently open is to turn off the menu, click the orange Firefox drop-down, and click New Tab. Why isn't it showing a tab, and a + tab (to open a new one) when only one tab (window) is open.

    Thanks everyone for the quick responses. Cntl + T works fine, and I did move the + window to the nav bar, which also works well.
    I had already gone into options and checked the box for always showing the tab bar, but it doesn't show it. I even unchecked it, saved the settings, the rechecked and saved the settings. Doesn't seems to make any difference.
    I'm okay with it not showing a tab when I only have one open, just so I can get to a new one easily when I want it.

  • Every time I open a second document the 1st one slides off the screen and I have to reopen everything.  I want to view more than 1 document at the same time.

    How can I view and work on more than one document at a time?  I've never had a problem with this but suddenly every time I open a new document the 1st one slides over out of sight.  How do I get that to stop?

    Hi bbd,
    Here is a screen shot of two documents open side by side. Drag the first document to the left of the screen. Open another document and drag it to the right of the screen.
    I have not had an open document slide from view. Puzzling!
    Regards,
    Ian.

Maybe you are looking for