hey folks as you see in the code I want to add new stage in the jmenuitem
but it give me this error because I cant use swing with stage as I think
enter image description here
and here is the error
enter image description here
Mixing Swing and JavaFX is not recommended unless you really know what you are doing and have a really good reason for it.
Otherwise, don't import swing and awt classes into a JavaFX project, only import JavaFX classes.
JavaFX has menu system support. If you are using JavaFX then use that.
You appear to want a ContextMenu rather than an application menu. JavaFX supports both types and both are documented in the referenced tutorial.
Related
**I have a "LWJGL Project" ** and I want to make some buttons by JavaFx scene in this project or put LWJGL in JavaFx scene .. but I can't understand how to do that.. any one have idea ?
Take a look at https://github.com/AlmasB/FXGL which is an open source framework to do exactly what you want for 2D type GL renders mixed with JavaFX.
JMonkeyEngine has been adding features and examples that have JavaFX 2D HUDs and GUIs over their 3D displays, so you may want to look at those.
Otherwise if you need to write it yourself, a quick way is to use SwingNode: place the LWJGL component in a SwingNode and then the SwingNode into the JavaFX layout. Be advised that you will have two separate rendering systems (JavaFX and Swing->OpenGL). Its really not hard but you'll need to code up any communications or event handlers that must "cross the divide".
I am new to AutoIt and I'm using its java bridge and I really liked it. But from what i understand even though it support swing and swt it does not support JavaFX. When I use it with a javaFx application, I cant get the texts with its finder tool. So is there a way to get around this? A simple way to get texts and other things from JavaFX application for test verification purposes? Thank you for all your answers
check JABSimpleSpy that is a spy based on java accessibiliy bridge build with AutoIt
https://www.autoitscript.com/wiki/FAQ#How_can_I_control_.28click.2C_edit_etc.29_an_external_.28html.29_application.3F
I am new in Eclipse 4(RCP) and I want to create an application in that any custom component can be defined and these components can be dragged and dropped between parts/views. (Like Scene Builder but it must run into e4)
How can it be possible? And which framework can supply my needs?
I look into JavaFX and GEF a little. But I could't make decision to use what.
The DND (Drag and Drop) in SWT provides several useful abstractions.
I think you'll need to get familiar with DragSource, DropTarget and Transfer object.
Please take a look at this article:
https://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html
Someone already posted a question like this in Eclipse Forums:
https://www.eclipse.org/forums/index.php/t/461505/
Is there a tool like FireBug (hover and get information about HTML and CSS) to see what is active in a JavaFX scene?
Try Scenic View – James_D
Scenic View is a JavaFX application designed to make it simple to
understand the current state of your application scenegraph, and to
also easily manipulate properties of the scenegraph without having to
keep editing your code. This lets you find bugs, and get things pixel
perfect without having to do the compile-check-compile dance.
I was thinking of building an application like Scene builder but for image editing.
I thought of doing a similar layout design like SceneBuilder where u can drag controls.
Is there any similar controls that could be used to replicate the gui of SceneBuilder?
Or is there any other different designs like a toolbox like gimp.
SceneBuilder code is open source.
If you want to replicate SceneBuilder's GUI, reviewing it's source might be a good place to start.