Author Topic: WindowEvents type error  (Read 1830 times)

Offline Birdron

  • byte
  • *
  • Posts: 22
    • View Profile
WindowEvents type error
« on: April 07, 2014, 02:10:49 am »
Hi,
   I have created the frame like this -
Code: [Select]
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 -
 
Code: [Select]
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?
« Last Edit: April 07, 2014, 03:00:32 am by Birdron »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: WindowEvents type error
« Reply #1 on: April 07, 2014, 08:14:26 am »
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

Offline Birdron

  • byte
  • *
  • Posts: 22
    • View Profile
Re: WindowEvents type error
« Reply #2 on: April 07, 2014, 09:20:39 am »
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.