[英]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. 我有一个Java类,尽管我知道OO C#C ++,但对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.
我想做的是创建一个侦听器,因此当按下F1键时,我会弹出一条消息以提示启动消息或其他内容。...有人告诉我,有很多Java风格,我编写的侦听器取决于Java。是我正在使用...。1-如何确定我的口味或Java,以便我可以继续研究如何在此代码上使用键盘甚至侦听器。 Thanks
谢谢
You can find your Java version by doing: 您可以通过执行以下操作找到Java版本:
$java -version
in the terminal. 在终端。
I suspect what you need to know is what GUI framework you're using. 我怀疑您需要知道的是正在使用的GUI框架。 There are three GUI frameworks:
有三个GUI框架:
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. 除非您的Java学习资源非常陈旧,否则您可能正在使用Swing或JavaFX-如果看到诸如JFrame , JApplet或JPanel之类的单词,则说明您正在使用Swing。 If you see Stages or Groups , you are working with JavaFX.
如果看到Stages或Groups ,则说明您正在使用JavaFX。
Here is more information related to Swing and JavaFX: 以下是与Swing和JavaFX相关的更多信息:
http://docs.oracle.com/javase/8/javase-clienttechnologies.htm http://docs.oracle.com/javase/8/javase-clienttechnologies.htm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.