SAEED
SAEED

Reputation: 89

What java do i have for my event listener

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

Upvotes: 0

Views: 42

Answers (1)

Aaron W.
Aaron W.

Reputation: 155

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:

  1. AWT
  2. Swing
  3. JavaFX

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

Upvotes: 1

Related Questions