I have a running java GUI application right now in a single class file, in this application I have a button that when clicked it is used to instantiate and display a separate form from a different class file in the same project. I am confused with how I actually access this other .java file in order to instantiate and display the form from it. Hope you can help.
Thanks, Beef
I have a running java GUI application right now in a single class file,
Share
How do you access any class file? JFrame, JPanel, JTextField are all examples of Java source code contained in separate files. You would use:
So to access your custom form your would use:
As long as the class file is found on your classpath it should not be a problem.
If you are having compile or run time problems then you need to display the message so we can give further help.