AddActionListener方法 [英] AddActionListener method

查看:182
本文介绍了AddActionListener方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我很困惑如何在点击时让我的按钮做某事,我的搜索后的理解是以下应该有效:


但是我得到了我的方法标题的非法表达式开头,以及最后期望的'';''


任何人看到的东西我都不是吗?

Hi all I''m confused about how to get my button to do something when it is clicked, my understanding after searching is that the following should work:

However im getting an illegal start of of expression for my method header and also a '';'' expected at the the last }

Anyone see something I don''t??

展开 | 选择 | Wrap | 行号

推荐答案


任何人看到我不喜欢的东西吨??
Anyone see something I don''t??



不,因为你看到了很多上下文(语法错误

来自),我们不会看。因为它是我们无法回答你的问题。


亲切的问候,


Jos

Nope, because you''re seeing a whole lot of context (where the syntax errors
come from) which we don''t see. As it is we can''t answer your question.

kind regards,

Jos


对不起乔斯,如果你不需要,就不想让你读完所有内容

Sorry Jos, just didn''t want to ask you to read everything if you didn''t need to

展开 | 选择 | 换行 | 行号


你是大括号不正确;因为现在你正在尝试在另一个方法中定义一个方法

(当然这不起作用)。检查一下。


亲切的问候,


Jos
You''re curly brackets are incorrect; as it is now you''re trying to define a method
inside another method (which doesn''t work of course). Check them all.

kind regards,

Jos


这篇关于AddActionListener方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆