Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embed Swing components from a separate Java/Swing process

I've been asked to investigate the possibility of embedding Swing components from separate Java/Swing processes into a different process. Think Chrome.

Essentially we would want to take the "top" level component and have it embedded in a tab.

This would, essentially, allow use to isolate the running process from the other processes and prevent any errors that occur in it not to effect the other running processes.

This is way over my immediate head, but any pointers would be greatly appreciated.

like image 388
MadProgrammer Avatar asked Nov 14 '22 15:11

MadProgrammer


1 Answers

What do you understand by process in this context?
Of course you can create JPanels that are moveable between frames, tabs and whatever. But it is hard to create a new Java process (what will be a new JVM instance) and share data with it. That will need some kind of interprocess communication like REST. An creating new processes makes no sense and is no Java pattern.

I think the use of Threads will fit your needs. Look at this drag and drop tutorial to create movable components.

like image 107
Stephan Avatar answered Dec 23 '22 10:12

Stephan