WindowEvents type error

Started by Birdron, April 07, 2014, 02:10:49 AM

Previous topic - Next topic

Birdron

Hi,
   I have created the frame like this -
private void initFrame()
{
frame = new Frame();
frame.setTitle("Hello World");
frame.setSize(Width, Height);
frame.setVisible(true);
frame.addWindowListener(new WindowEvents());
keyMapper = new KeyMapper(frame);
}

   And I am getting this error -
  WindowEvents cannot be resolved to a type

   Another Question - to load static light map (baked), do I have to use shaders or there is in built support for it?

EgonOlsen

The first question isn't jPCT related at all....anyway: AFAIK, there's no class in the JDK called WindowEvents. And even if it were, there's no point in adding something that is supposed to be an event as a listener. And even if it would, there's no point in adding an instance of such a class without any additional implementation that actually does something when the event happens. So this is wrong in at least 3 ways of looking at it. What did you had in mind with it in the first place?

About the light maps: No, there's no need for shaders. You can use simple multi texturing using the TextureInfo class. However, you'll run into the problem that neither 3ds nor obj format supports multi-texturing. This thread has more information: http://www.jpct.net/forum2/index.php?topic=1790.0

Birdron

1: I just wanted a key input to exit the application. I sort it out, it was simple.

2: Ok, I will try that method for the shadow.

Thank you.