Display .blend inside interface java

Hello,
I want to display .blend file inside an interface java and i already saw Java .Blend tutorial but i can’t understand how can i do this.
Could you help me please?

What?

I want to open or encapsulate a .blend file inside an interface java

What is “an interface Java”?

https://www.mikeash.com/getting_answers.html

Can you maybe try to explain why? Maybe it will help us understand more, or what you have tried?

What dou you mean by that?

You can open blend files by importing them into your project (assets) folder. Then you either can work with your model in the SDK or in code!

It seems like you haven’t read the tutorials yet! So please, do so!

https://jmonkeyengine.github.io/wiki/jme3.html#tutorials-for-beginners

Okey sorry.
First, I created an application with blender3D which contain a script python.
Second, I created an application with JavaFX and mysql.
Now, I would like to integrate .blend in a java interface like a simulator that will simulate the execution of my python scripts that I will execute it with java button.
I hope i am clear and for for my english.
Thanks

Is there any solution?

You can use a canvas to display a model using jmonkey. Im not certain, but I think this is what you want.

thank you for your reply.
can i display .blend file in this canvas?

If your question is “Can I display a .blend file that runs python scripts without writing any code?” Then the answer is no.

Otherwise, do the JME tutorials and get familiar with the library and then check back with more specific questions.

Please pspeed, it’s nos my question. i want just display a blend file in a widget or a frame. that set

Do you want to write code to do it or just click a button?

The answer is no.

No is the answer.

You will have to write code to do it.

1 Like

I create a frame but i look for embed .blend in this frame.
this is my code:
import java.awt.BorderLayout;
import java.awt.Component;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.swing.JFrame;
import org.blender.utils.resources.;
import org.cakelab.blender.io.
;

public class Blender {
public static void main(String[] args) {
JFrame frame = new JFrame(“test”);
frame.setBounds(100, 100, 1000, 500);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setVisible(true);
}
}

Do the tutorials:

1 Like

I ask for a help and not wiki.

And expect us to take our time to explain stuff that is already written on the wiki.

1 Like

I create a programme java that can create a file .blend and also i create a JFrame.
I look for embed file.blend inside the JFrame.
Could you help me please?
This is my code:
import static org.blender.utils.BlenderFactory.*;

import java.io.File;
import java.io.IOException;
import javax.swing.JFrame;
import org.blender.utils.MainLib;
import org.cakelab.blender.io.BlenderFile;
public class Test {

public static void main(String[] args) throws IOException {
	BlenderFile blend = newBlenderFile(new File("V3.blend"));
	//
	// create a main library to manage references on data in blender file.
	//
	MainLib main = new MainLib(blend);
	// ..
	//
	// write new file to disk.
	//
	blend.write();
	//
	JFrame f = new JFrame("Lecteur Blend");
    f.setSize(512,512);
    f.setLocationRelativeTo(null);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setVisible(true);
    //f.getContentPane()(blend);
}
}

You are not using jme at all in that example. As it was already said to you, all the information you need is covered in the wiki.

can you give me just the part of tuto that can help me?