解决java安装失败JDK双击没反应?

解决java安装失败JDK双击没反应?,第1张

1、首先进入的JAVA官方网站,根据系统环境,自动切换到对应的语言网页。点击免费JAVA下载。

2、若是的旧版本的JAVA,需要卸载,若卸载不干净,则可以使用的官方网站上的删除旧版本功能。

3、没有旧版本要删除,直接点击同意并开始免费下载,使用的在线安装,可以通过JAVA官方网站对当前的Windows系统进行检测,并下载适合的JAVA版本。

4、下载后,直接运行,并点击安装。

5、安装的时候,程序也会检测当前 *** 作系统是否存在旧版本的JAVA,并提示用户卸载。

6、卸载完成之后,点击下一步继续安装JAVA。

7、当下载的本地的JDK双击也无法安装的时候,有可能是安装包损坏不完整,都可以通过在线安装的方式,进行排除。

直接在JBuilder中新建一个应用程序 至于具体步骤就不描述了 此代码没有main函数无法直接运行 下面我贴出在Frame 中的代码 import java awt *import java awt event *import javax swing *import borland jbcl layout *import java util Datepublic class Frame extends JFrame {JPanel contentPaneBorderLayout borderLayout = new BorderLayout()JPanel jPanel = new JPanel()XYLayout xYLayout = new XYLayout()JScrollPane jScrollPane = new JScrollPane()JList jList = new JList()//初始化的JList中的数据String[] strData = { One Tow Three }//保存点击按钮的时间long clickTime = //Construct the framepublic Frame () {enableEvents(AWTEvent WINDOW_EVENT_MASK)try {jbInit()}catch (Exception e) {e printStackTrace()}}//Component initializationprivate void jbInit() throws Exception {contentPane = (JPanel)this getContentPane()contentPane setLayout(borderLayout )this setSize(new Dimension( ))this setTitle( Frame Title )jPanel setLayout(xYLayout )jList addMouseListener(new Frame _jList _mouseAdapter(this))contentPane add(jPanel BorderLayout CENTER)jPanel add(jScrollPane new XYConstraints( ))jScrollPane getViewport() add(jList null)jList setListData(strData)}//Overridden so we can exit when window is closedprotected void processWindowEvent(WindowEvent e) {super processWindowEvent(e)if (e getID() == WindowEvent WINDOW_CLOSING) {System exit( )}}//具体实现按钮双击的功能的方法  很简单的算法 不做解释了public boolean checkClickTime() {long nowTime = (new Date()) getTime()if ( (nowTime clickTime) <) {clickTime = nowTimereturn true}clickTime = nowTimereturn false}void jList _mouseReleased(MouseEvent e) {//判断是否双击 是的话写你要实现的功能if (checkClickTime()) {System out println( Click Double )}}}class Frame _jList _mouseAdapterextends java awt event MouseAdapter {Frame adapteeFrame _jList _mouseAdapter(Frame adaptee) {this adaptee = adaptee}public void mouseReleased(MouseEvent e) {adaptee jList _mouseReleased(e)}} lishixinzhi/Article/program/Java/hx/201311/25810


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/11664986.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-17
下一篇 2023-05-17

发表评论

登录后才能评论

评论列表(0条)

保存