You can talk back and forth using sockets. Here is a tutorial on how to do something like this. .
Unfortunately, I do not think that this will help you minimize the use of CPU, RAM, etc. If anything can increase CPU usage, RAM usage, etc., because you need to run two JVMs instead of one. Unless you have a window with incredibly complex settings, it is unlikely that you will need many resources that you need to worry about. By adding network connectivity, you simply add more complexity without adding any benefits.
Edit:
If you read Filthy Rich Clients, one of the highlights of the book is that Rich Effects doesn't have to be resource intensive. The main part of the book is devoted to how to add cool effects to the application without taking up a lot of resources. Throughout the book, they are very careful to show everything that takes a lot of time and what does not. This is critical when you make an application less resource intensive. Write your application, see what it feels slow, add a time code to those details that are slow, and speed up these specific parts of the code. Check your time code to see if it is really faster. Rinse and repeat. Otherwise, you are doing an optimization that may not make any difference. Without considering the time of your code, you don’t know whether you need to speed up the code, even if you have accelerated it after optimization.
Others mentioned loading the properties window in a separate thread. It is important to remember that Swing has only one thread, called EDT , which performs the entire picture of the pixels on the screen. Any code that causes a change in pixels on the screen should be called from the EDT and, therefore, should not be called from a separate thread. So, if you have something that can take some time (maybe a web service call or expensive calculations), you should start a separate thread with EDT, and when it finishes the startup code in EDT to update the user interface, there are libraries such as SwingWorker to make it easier. If you set the dialog to be visible, it should not be in a separate stream, but it makes sense to create data structures in a separate stream if it takes a lot of time to create these data structures.
Using Swing Worker is one of the many valuable ideas at Filthy Rich Clients to make the interface more responsive. Using the ideas in this book, I used a rather resource-intensive interface and made them so that the user interface practically did not use any resources.