gpt4 book ai didi

java - 出了什么问题? :(

转载 作者:行者123 更新时间:2023-12-01 08:15:54 24 4
gpt4 key购买 nike

if((wort[0] == "A") && (wort[1] == "P") && (wort[2] == "F") && (wort[3] == "E") && (wort[4] == "L") && (wort[5] == "K") && (wort[6] == "U") && (wort[7] == "C") && (wort[8] == "H") && (wort[9] == "E") && (wort[10] == "N")) {

frame.remove(panel);
frame.add(winpanel);
winpanel.add(winmeldung);
winpanel.add(beenden);
frame.validate();

嗨,我这里有一个巨大的项目,所以我只发布其中的一部分。我想检查一些东西,如果属实,应该打开一个新面板。但每次运行时,我都会因为“未知来源”而收到错误。为什么??

编辑:

错误:

at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

最佳答案

有一点肯定是错误的:

wort[0] == "A"

应该是

wort[0].equals( "A")

String 比较始终应使用 equals() 而不是 ==(字符串文字比较的情况除外)

关于更新的异常,请参阅 this (或)this讨论可能会有所帮助。

关于java - 出了什么问题? :(,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13382834/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com