I have a Java class and although I know OO C# C++ but not handy with Java. This class runs on the web and it is a page that has a few controls on it. What I like to do is to create a listener so when F1 is pressed I could pop up a message for start or something.... I have been told that there are many flavours of Java and the listener that I write depends on what Java it is that I am using.... 1- How do I figure out what flavour or Java I have so I could continue my research on how to do a Key-board even listener on this code. Thanks
You can find your Java version by doing:
$java -version
in the terminal.
I suspect what you need to know is what GUI framework you're using. There are three GUI frameworks:
Unless your Java learning resource is very old, you are probably working with Swing or JavaFX- if you see words like JFrame , JApplet , or JPanel , you're using Swing. If you see Stages or Groups , you are working with JavaFX.
Here is more information related to Swing and JavaFX:
http://docs.oracle.com/javase/8/javase-clienttechnologies.htm
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.