Nothing in Greenfoot stops you from using native methods. Consider the Gamepad library. However if you want to use your own native methods you will actually need to write them (in C or C++), compile then and link them into a dynamic library.
@davmac Ok, thanks for making it clear that I can use them. I have some experience with C (not C++), but I think that C will be good enough for the job. If I have some trouble using them (not the C coding, but linking the methods with greenfoot), may I ask here?