To add button. Plz help.

I have written a code using JOGL which is executing properly, now I want to add a button to provide an additional functionality.I want to know how to add button using JOGL. Is it the same way as you add button using AWT. But I get error messages if add like that.

I imported the AWT component and implemented the Action Listener

and added the button as usual and defined the functionality in the actionPerformed() method. But when i compile the program i get error in the line: add(b1); where b1 is the button.

So all I want to know is adding a button is anyway connected with JOGL coding.

[614 byte] By [suryaprabaa] at [2007-10-2 16:03:38]
# 1
probably a stupid question.... but did you add the ActionListener to the button?the only other thing I can think of is a typo....
Les1984a at 2007-7-13 16:37:53 > top of Java-index,Other Topics,Java Game Development...