是否可以使用字符均衡Button?

时间:2015-12-13 02:29:33

标签: java button character jbutton equals

我需要一些帮助!

Request URL:https://videodesktv-ingest-syd.s3.amazonaws.com/console/2_mumford_lover_of_the_light.mp4?uploads
Request Method:OPTIONS
Status Code:403 Forbidden
Remote Address:54.231.252.151:443
Response Headers
view source
Content-Type:application/xml
Date:Mon, 14 Dec 2015 04:29:06 GMT
Server:AmazonS3
Transfer-Encoding:chunked
x-amz-id-2:0dkXc0/yOnzrI6T9cClx6R6SQI8ixfs99rS5zX0nuCorHyVNh7CEWzbuNnay5KEmhQD1816MdRQ=
x-amz-request-id:D4EDCC40832B34AC
Request Headers
view source
Accept:*/*
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8
Access-Control-Request-Headers:authorization, content-type, x-amz-acl, x-amz-content-sha256, x-amz-date, x-amz-meta-qqfilename
Access-Control-Request-Method:POST
Connection:keep-alive
Host:videodesktv-ingest-syd.s3.amazonaws.com
Origin:https://videodesk.tv
Referer:https://videodesk.tv/1/console
User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36

正如您所看到的,我在这里有部分代码。当我开始我的"程序"它显示一个带有不同按钮的窗口,它不完全像这样(仅用于显示问题)但是当我点击一个按钮时,如果有一个X我想要它"翻转"和O出现。

我认为问题出在第10行,因为按钮不能等于某个字符。我真的不知道你能帮助我吗?

谢谢!

1 个答案:

答案 0 :(得分:0)

您需要从按钮中检索文本值并进行比较。

buttonArray[4].getText().charAt(0) == 'X'

buttonArray[4].getText().equals(Character.toString('X'))

您正在将按钮对象与字符串进行比较。