- May 8, 2005
- 415
- 0
- 76
This seems like it should be really simple and maybe it is and I'm just not seeing it.
Anyway, in netbeans, i created a simple project with a main.java. I then created a jframe which created a jframe class which has a jtable in it. Now, I want to fill the jtable in with values from a data structure i've established in main.java but i can't figure out how to pass the values on.
from my static void main() method in main.java, i can call cFrame.main(null) to bring up the jframe but if i try to pass any data that is not static, it gives me an error, any suggestions?
Edit:
to clarify, i have two classes, main.java and cFrame.java and i want to pass a variable from main to cFrame
Anyway, in netbeans, i created a simple project with a main.java. I then created a jframe which created a jframe class which has a jtable in it. Now, I want to fill the jtable in with values from a data structure i've established in main.java but i can't figure out how to pass the values on.
from my static void main() method in main.java, i can call cFrame.main(null) to bring up the jframe but if i try to pass any data that is not static, it gives me an error, any suggestions?
Edit:
to clarify, i have two classes, main.java and cFrame.java and i want to pass a variable from main to cFrame
Last edited: