Current Forum: Homework 6 - Part II |
Date: Tue Dec 4 2001 11:27 am |
Author: White, David <white3@andrew.cmu.edu> |
Subject: can't get gui to load myplayer class |
|
|
I'm not an expert so, I'm not sure what the problem is. The class file is in the directory I'm running the gui.
Is it possible that we need to have the .newInstance() function implemented in our interface?
Thanks
(here is the code from the GraphicsGame that makes me think that..)
Class playerClass = Class.forName(p1classname); pb = (Player)playerClass.newInstance(); |
|