Close a stage using the netbeans javaFX-composer

Hi, can anybody tell me how to close and open a new stage by a "if query"? (sorry for my english)
something like this:
if (a==b) {
close the current stage
and open this
var d = NextStage{};
javafx.stage.Stage {
title: "My new Stage"
scene: d.getDesignScene();
there must be a easy way to do it?! Thanks for your help

h3. *{color:#ff0000}Oracle Forums - Starting Sept 24th, 2010, these forums will be read-only. At that time, there will be new forums created at [http://forums.oracle.com] to accommodate most of the discussion topics here.{color}*
db

Similar Messages

  • Using the Netbeans GUI within a Project with existing Ant Script

    I cannot seem to figure out how to use the Netbeans GUI in my Project with existing Ant Script. Is this possible? I have no problem creating GUI interfaces in a java Application, but attempting to make a new JFrame Form gives the error: package org.jdesktop.layout does not exist, and I have not been able to find a way around this. Any suggestions? Thanks in advance.
    Chris Coulon

    OK, I think I am on the right track, but I don't understand why I am still getting this error:
    clean:
    compile:
    Copying 1 file to /Users/chris/**JavaProjects/Netbeans_ImageJ
    Created dir: /Users/chris/**JavaProjects/Netbeans_ImageJ/source/build
    Compiling 292 source files to /Users/chris/**JavaProjects/Netbeans_ImageJ/source/build
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:31: package org.jdesktop.layout does not exist
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:31: package org.jdesktop.layout does not exist
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:34: package org.jdesktop.layout does not exist
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:38: package org.jdesktop.layout does not exist
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    4 errors
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/build.xml:11: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 6 seconds)
    I no longer have the error in my java code in the Projects list, but I still cannot build the project. This is my current build.xml file:
    <!-- Ant makefile for ImageJ -->
    <project name="ImageJ" default="run">
      <target name="compile" description="Compile everything.">
          <!-- Copy the swing layout library into dist.lib -->
        <copy file="dist/lib/swing-layout-1.0.3.jar" todir=".." />
        <!-- First, ensure the build directory exists. -->
        <mkdir dir="build" />
        <!-- Build everything; add debug="on" to debug -->
        <javac srcdir="." destdir="build" optimize="on" source="1.4" target="1.4" debug="on">
          <!-- The plugins directory only needs to be
                 present at runtime, not at build time. -->
          <!-- exclude name="plugins/**"/-->
        </javac>
      </target>
      <target name="build" depends="compile" description="Build ij.jar.">
        <!-- Copy needed files into the build directory. -->
        <copy file="IJ_Props.txt" todir="build" />
        <copy file="images/microscope.gif" tofile="build/microscope.gif" />
        <copy file="images/about.jpg" tofile="build/about.jpg" />
         <copy file="plugins/MacAdapter.class" tofile="build/MacAdapter.class" />
        <copy todir="build/macros"><fileset dir="macros"/></copy>
        <!-- Build ij.jar. -->
        <jar jarfile="ij.jar" basedir="build"
             manifest="MANIFEST.MF" />
      </target>
      <target name="clean" description="Delete the build files.">
        <delete dir="build" />
        <delete file="ij.jar" />
      </target>
      <target name="run" depends="build" description="Build and run ImageJ.">
        <copy file="ij.jar" toDir=".." />
        <java maxmemory="640m" jar="ij.jar" fork="yes" />
      </target>
      <target name="run2" depends="build" description="Build and run ImageJ.">
        <!-- Run in ImageJ directory -->
        <copy file="ij.jar" toDir=".." />
        <java maxmemory="640m" dir=".." jar="ij.jar" fork="yes" />
      </target>
      <target name="zip" depends="clean" description="Build zrc.zip.">
        <zip zipfile="../src.zip"
           basedir=".."
           includes="source/**"
        />
      </target>
      <target name="javadocs" description="Build the JavaDocs.">
        <delete dir="../api" />
        <mkdir dir="../api" />
        <javadoc
               sourcepath="."
               packagenames="ij.*"
               destdir="../api"
               author="true"
               version="true"
               use="true"
               windowtitle="ImageJ API">
        </javadoc>
      </target>
       </project>notice I added this line: <copy file="dist/lib/swing-layout-1.0.3.jar" todir=".." />
    because the dir ".." is where the other jar files are placed, i.e.:
    [GAIAG:~/**JavaProjects/Netbeans_ImageJ/source] chris% ls ..
    PolarDisplay          ij.jar               swing-layout-1.0.3.jar
    TestFrames          myApp
    api               source
    So why is the build not able to see the package org.jdesktop.layout in the jar file?
    Chris

  • Photoshop closes when I use the liquify tool. How do I fix that?

    Photoshop closes when I use the liquify filter. How can I fix that? 

    Update video card driver from makers website.

  • Using the Netbean for J2me

    I using the Netbean to write the J2ME games, but everytimes I press the run command, the Norton Antivirus will detected a worm, should I keep blocking it or allow it?

    The emulator is using sockets for internal communication. You have to configure your antivirus not to block the communication. I don't know how to do that for NAV.

  • The App Store closes everytime I use the search for an app on my ipod touch using iOS6.

    Can I do anything to stop the App Store closing everything I use the search function?

    See if this helps:
    IOS 6 App store crash: Apple Support Communities

  • Forum for Netbeans, JavaFX Composer ...

    I don't see a dedicated forum for JavaFX/Netbeans users. At the forums.netbeans.org site there is'nt anything dedicated for JavaFX. Here there is'nt anything dedicated for Netbeans.
    IMHO a dedicated forum would be valuable. JavaFX seems to be the "future client stack" for Java and Netbeans the principal IDE that supports it.
    What do you all think ?.
    /rk

    Hi,
    There is no forum at NetBeans forum site dedicated for JavaFX since there is no overwhelming amount of messages with JavaFX topic for requiring separation from the nbusers forum.
    We have a mailing list (with a message archive) dedicated specifically to JavaFX:
    [email protected]
    You can freely subscribe there.
    Regards,
    David

  • How do i move a sprite across the stage using the arrow keys on my keyboard?

    I'm a high school student and i love director. I recently have become interested in game development, and i am completely lost in how to move a sprite across the stage. I have tried toying around and google hasn't been very helpful. An example of something i found is
    on keyUp
      if (_key.keyCode = 124) then sprite(4).locH = sprite(2).locH -25
      if (_key.keyCode = 123) then sprite(4).locH = sprite(2).locH -25
    end keyUp
    I don't understand why this wont work.
    HELP

    This code moves sprite 2 to a position relative to sprite 4. If sprite 4 is not moving, then sprite 2 will always move to the same position, so it will not appear to move at all.
    Perhaps this code makes more sense:
    on keyUp
      if (_key.keyCode = 124) then sprite(2).locH = sprite(2).locH +25
      if (_key.keyCode = 123) then sprite(2).locH = sprite(2).locH -25
    end keyUp

  • JavaFX Composer ImageView not loading

    I'm using Netbeans JavaFX Composer but when I insert an ImageView node I can't see it in the design view. Of course when I run the script it's displayed correctly, any ideas? Thanks in advance.

    Ok, I've just solved the problem. I've been working with Netbeans and JavaFX for many versions since JavaFX 1.0, so I think my problem is related with updating netbeans once and again. I've uninstalled all my netbeans, download latest jdk (1.6.0_18), latest javafx (1.2.3) and netbeans again and now the composer works like a charm ;-)

  • How to use the COMM API in a JAR file

    I have developed an application, using the NetBeans IDE, to communicate with a modem over the COM1 serial port using the Java Comm API. The application works fine within the IDE, but when a JAR file is created and "double-clicked", the application launches correctly, but when the code is executed to "talk" over the COM1 serial port - nothing happens. No exceptions and no warnings are thrown. My environment is XP, SP1.
    The manifest file is as follows:
    Manifest-Version: 1.0
    Class-Path: ../j2sdk1.4.2/jre/lib/ext/TimerBean.jar ../j2sdk1.4.2/jre/
    lib/ext/AbsoluteLayout.jar ../j2sdk1.4.2/jre/lib/ext/comm.jar
    Created-By: NetBeans IDE
    Specified-By: Projects/TheApp/Files/TheApp.jarContent
    Main-Class: Main
    According to the Comm API installation instructions, the following files are copied:
    copy comm.jar \j2sdk1.4.2\jre\lib\ext
    copy wind32com.dll \j2sdk1.4.2\bin
    copy javax.comm.properties \j2sdk1.4.2\jre\lib
    I suspect it has something to do with the paths.
    Any help would be greatly appreciated. Thanks.

    Thanks for your input, but after trying what you suggested the problem still exists. I think your right to be suspicous of the javax.comm.properties file. The application, that worked in the IDE, exhibits the same behavoir as the JAR file if the javax.comm.properties file is removed from the ../jre/lib directory. In other words it compiles correctly in the IDE, but when executed, nothing happens when the code that "talks" to the serial port is run.
    I've tried moving the javax.comm.properties file into the working directory. Also, the CLASSPATH and PATH system variables were modified to include the path to javax.comm.properties.
    If you have anymore ideas, please let me know.
    Thanks.

  • How to close and re-open the browser

    I have just downloaded a program and to fully install it it is requesting that I close the browser and re-open it. I don't know how to close and re-open the browser. Can you tell me how to close and re-open the browser? Thank you

    It is always best to use File > Exit<br />
    That will close all open windows, so if there are still other windows open then these won't close if you use the close X on the title bar.
    Also make sure that you do not have security software that is locking files in the Firefox program folder.

  • App won't run outside of the netbeans ide

    I created a very simple app using the netbeans ide I made a jframe that when the button is pressed displays text, it works when I select "run file" however when it is built into a .jar it doesn't run, I think it might be because the main is empty and the jframe contains the actual code, I'm lost as I'm a complete noob

    it works when I select "run file" however when it is built into a .jar it doesn't run, I think it might be because the main is empty and the jframe contains the actual codeDo this:
    In the "projects" tree structure, right click on the current project node which contains the jframe. Select 'Properties' , a dialog would show, select 'Run' in that dialog, you can find a field 'Main class', check whether it shows the correct class, if not click the Browse button in front of it and select the correct class i.e the jframe class.
    Now when this is done, right click the Project node again and select 'Build' , then after 'building' right click and select 'Run', if the project runs correctly everything is alright.
    Now go to the place where your project is actually saved, go to 'dist' folder and double click the jar file or run the jar through cmd, it would work.... and don't copy the jar file somewhere else, if you want to run it somewhere else, copy the whole 'dist' folder and run the jar from there.... thats what previous reply recommended.
    Thanks!

  • I cannot start the NetBeans IDE

    THis is the first time i use the NetBeans
    but when i try to start it I recieve this error
    " Cannot start the IDE "
    and i installed the J2ri , J2sdk and netbeans_mobility

    Hi,
    could you please be more specific on the error? When does it show up? Doing what action? Do you have any further info in log file (<userdir>/var/log/messages.log)?
    Peter

  • Is there an extension that would allow me to choose Firefox profiles that contain different extensions and/or themes before startup (but using the same version of Firefox)

    I'm actually looking for an extension... I would like to run a barebones Firefox, a testing Firefox (a couple of addons), a loaded Firefox, and maybe Firefox with different themes. (''Is this part of what different profile does?'') And I would like to select which profile I would like when Firefox starts (and when I want to change my option I just restart Firefox)

    I don't think that you can do it as you want (restart Firefox with a different profile).<br />
    You will have to close Firefox and use the Profile Manager to choose another profile.
    See also:
    *https://developer.mozilla.org/en/Profile_Manager

  • I am using a Microsoft Natural keyboard and when i use the close button on Ver. 5.0 or newer it closes the whole screen not just the active tab is there a fix for this

    I am using a Microsoft Natural 4000 Keyboard
    IF I update to Mozila 5.0 when i use the close button it shuts down the whole browser nut just the active tab
    Is there a workaround for this because I like the close button feature

    Could you try disabling graphics hardware acceleration? (I'm having trouble determining from your "More system information" whether it's enabled or disabled.) Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
    You usually need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
    orange Firefox button ''or'' classic Tools menu > Options > Advanced
    On the "General" mini-tab, uncheck the box for "Use hardware acceleration when available"
    If you restart Firefox, is the issue resolved?

  • Using log4j with JavaFX and Netbeans 6.8

    Hello,
    I'm trying to use log4j within a JavaFX project using NetBeans 6.8.
    I've donwloaded the .zip file from the Apache website and added the log4j-1.2.16.jar to the project's libraries.
    Then I added the imports:
    import org.apache.log4j.Logger;
    import org.apache.log4j.BasicConfigurator;But using the Logger class does not work:
    def log:Logger = Logger.getLogger("MyApp.class");NetBeans says 'cannot find symbol'
    When I'm doing the same things within a Java project, everything works fine.
    What am I doing wrong?
    thanks
    Edited by: Lichti on Apr 17, 2010 12:08 PM

    To answer my own question ... there's a known bug in NB 6.8 with including JARs.

Maybe you are looking for