Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I embed two or more PApplets? #8

Open
ylascer opened this issue Aug 12, 2024 · 3 comments
Open

How can I embed two or more PApplets? #8

ylascer opened this issue Aug 12, 2024 · 3 comments

Comments

@ylascer
Copy link

ylascer commented Aug 12, 2024

According to your example, it starts from one PApplet, and then launce JavaFX GUI.
so then, if I want two or more PApplets, what should I do?

And another question is~,
Is there any way to start JavaFX GUI at first and then call(embed) the PApplets as componet of GUI ?

It'll be very thankful if you provide an example code.

@micycle1
Copy link
Owner

Do you mean 2 PApplets within one JavaFX stage?

@ylascer
Copy link
Author

ylascer commented Aug 12, 2024

Do you mean 2 PApplets within one JavaFX stage?

Yep. in one JavaFX stage, and maybe think about divided two or more anchorpanes, for example 1 PApplet in one anchorpane, and anothor PApplet in anothor anchorpane.
Is it possible ??
====< Add more information for my intention>===
Basically, I want to execute Java programe, with JavaFX GUI.
there may be many other components in GUI.
finally, two or more PApplets embeded in two or more anchorpanes each. and PApplets interacts with other JavaFX components.
PApplet's anchorpane (exactly javafx canvas) could be resizable, maximizable, minimizable without influence.

@micycle1
Copy link
Owner

You could perhaps try having 2 App.surface variables and assign the surface of a PApplet to each, then launch the JavaFX app.

@ylascer ylascer changed the title How I embed two or more PApplets? How can I embed two or more PApplets? Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants