ok, so I feel like a douche but have been stuck on something that is usually simple.
I have tested these separate and they work fine but when I went to marry them together I had the dreaded Cannot make a static reference to the non-static method
addListenerClass :
and ProgramMap :
ProgramMap.addCorePanel(coreTemp); - is the problem...
It is something stupid but I can not remember how to fix it.
Thanks
floppy
I have tested these separate and they work fine but when I went to marry them together I had the dreaded Cannot make a static reference to the non-static method
addListenerClass :
if(confirmAdd == JOptionPane.YES_OPTION)
{
Course coreTemp = new CoreCourse(
ToolBar.getCourseCodeInput().getText(),
ToolBar.getCourseTitleInput().getText(),
ToolBar.getCreditPoints());
System.out.println(coreTemp.toString());
ProgramMap.addCorePanel(coreTemp);
}
and ProgramMap :
public class ProgramMap extends JPanel {
public ProgramMap(AMSView Frame){
all the bits
public void addElectivePanel(Course coreTemp){
all the bits...
}
ProgramMap.addCorePanel(coreTemp); - is the problem...
It is something stupid but I can not remember how to fix it.
Thanks
floppy