I have a particular class from the package: org.jdesktop.swingx.JXErrorPane.
I used a factory class to call the methods in the JXErrorPane class, while I forbid any other classes to call JXErrorPane. Any other class which needs to use JXErrorPane class needs to call the factory class.
I found on this website:http://www.eclipsezone.com/eclipse/forums/t53736.html on how to forbid accessing to a particular class or package, but it would forbid my factory class as well.
Is there a way to only allow the factory class to visit the API class but forbids any other classes?