Hi,
I am having no troubles with AWTGLCanvas and mouse listeners. To find out what is going wrong with your code, please first try the following simple test case:
public static void main(String[] args) throws Exception {
JFrame frame = new JFrame("Mouse Test");
AWTGLCanvas canvas = new AWTGLCanvas() {
protected void paintGL() {
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
try {
swapBuffers();
} catch (LWJGLException e) {
}
}
};
frame.setSize(200, 200);
frame.getContentPane().add(canvas);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
canvas.addMouseMotionListener(new MouseMotionListener() {
public void mouseMoved(MouseEvent e) {
System.out.println(e);
}
public void mouseDragged(MouseEvent e) {
System.out.println(e);
}
});
frame.setVisible(true);
}