I have two classes, one with a main method that displays a main frame. and another which makes a JPanel which i would like to display on the main frame in the other class. I have it working and compiling but not really showing on the main frame like i want it. It shows in the main frame as a very small square grey box.
Main Frame Program called testpanel:
Second Class called addpanel.
I need to be able to see the JPanel made in the second class in the main frame made in the first class, if that makes any sense.
Can anyone help me please !
posted 11 years ago
in addpanel(), you're creating a number of components and adding them to typeinfo, but it is not typeinfo being added to testpanel, it is an instance of addpanel. You need to add typeinfo to addpanel