I had a problem that I posted before but got no clear solution
How to prevent JFrame from closing.
So I am posting a SSCCE may be this might help in better u
You could use JFrame.getFrames()
which returns an array of Frame
(you could also getWindows()
for a much lower level list of those windows created within the current application context).
Then, you need to walk through, checking each frame to see if it meets your requirements. After, that, you don't need reflection, you gain direct access to the frames
The only only way to communicate with other JVM's is via socket comms (such as RMI).
UPDATE WITH EXAMPLE
Frame[] listOfFrames = JFrame.getFrames();
for (Frame : listOfFrames) {
if (frame instanceof JFrame) {
JFrame aFrame = (JFrame)frame;
}
}