EDIT: what I want the code to achieve:
1) Controller class
- runs in the background
- creates the shopping cart
- creates listeners for applications which are going to add items to the shopping cart
- will regulate which application has access to the screen
2) ShoppingCart class
- runs in the background
- recieves items from non-Java based applications
- stores these items "in the cart"
3) Checkout class
- GUI for user to remove items from their cart
- will complete the transaction before returning control to the shopping cart

I'm new to javafx - and have not used java in years, to wit, I am attempting the following:

-------------------------------------------------------------------------------------------------------------------------------
When I try to run the code, I get the following:
-------------------------------------------------------------------------------------------------------------------------------

Exception in thread "main" java.lang.IllegalStateException: Not on FX application thread; currentThread = main

You can launch a Java application from the main thread by invoking Application.launch.
http://docs.oracle.com/javafx/2/api/javafx/application/Application.html#launch%28java.lang.Class,%20java.lang.String...%29

There is a very strict caveat on it =>
"Launch a standalone application. This method is typically called from the main method(). It must not be called more than once or an exception will be thrown."

I'm kind of lost as to what your program has to do with JavaFX as there is no JavaFX code in it other than the ShoppingCart extending Stage and then doing a bunch of socket stuff, which is a weird thing to do in something that extends Stage. Normally if you want to do socket based stuff, you want to do it off of the JavaFX thread using a Task or Service (you seem to want to use executors, so perhaps a service would be best for you). However, in your case, seeing as you can't even run an application, I'd get the application running and doing a bunch of other stuff first before trying to tackle concurrent tasks with it.

I had actually developed the application first and am now moving it into threads so I can actually listen for data being sent to it from non java applications... I had initially shown the shopping cart contents via ShoppingCart, but am now creating another class called Checkout to do this.

I posted the question while I was refactoring the code, as I knew I did not know how to achieve this. Will be using your input to create an instance of Checkout and will let you know how it goes - looks like what I am looking for though :)

What I want to do is have the Java Application spawn a JavaFX 'Checkout' where the user is able to edit items in their shopping cart before submitting a transaction. I have been unable to find a way to 'hide' the stage, but need to do this as another (non Java) application is presenting advertising content which the user selects to put in the shopping cart.

Any more thoughts are most appreciated.

... I think I might also post what I want to do in my initial message...

The learning process is always interesting when you are behind the 8-ball with respect to a timeline...

What you sent me works perfectly :D I just have to show and hide the stage when in/not in use. Thinking I could use some more "Java" if I am going to be trying to use a language I have not used in a while on so little sleep ;)

I've done some searching and aparently you would need to repost the same answer for me to be able to show your answer as being correct (for whatever reason, it is not changeable)

Answer:

You can launch a Java application from the main thread by invoking Application.launch, but you can only call it once per process or an exception will be thrown:
http://docs.oracle.com/javafx/2/api/javafx/application/Application.html#launch%28java.lang.Class,%20java.lang.String...%29

---------

Related:

The lifecycle and management of threads executing user code by the JavaFX application is documented in the JavaFX Application javadoc:
http://docs.oracle.com/javafx/2/api/javafx/application/Application.html