I'm not sure what you want to do. AWT has a set of permissions that you can configure when you run the application in the sandbox (see AWTPermission , but they are very limited, and more aimed at preventing applets from doing bad things.
In addition, preventing imitation of another application does not seem impossible to me; if both applications are allowed to create user interface components, what prevents the creation of the same user interface components as others?
, , , , , -; , , , . Java, , - , JVM, , , ( FocusListener ).