Is it possible for someone to launch a JFrame from a java program, but instead of the JFrame creating its own window, the java program launches it into an existing window? I thought of trying a classloader, something like this:
Class framed = WhateverClassThisIs.class.getClassLoader().loadClass("foo.class");
JFrame launch = (JFrame) framed.newInstance();
WhatEverJFrameBeingUsed.add(launch);
and then just simply add it to the container i'm using currently. But what if the class references another JFrame, like a main class, how do i get that JFrame and contain it in the same existing JFrame? Is it possible to get a Graphics object from a PID, or some other reference to the program?
EDIT: I'm doing this in Linux, on XOrg, preferably on Debian Squeeze
No comments:
Post a Comment