[英]UnsupportedOperationException: Not supported yet. in jframe
I am making an application in jframe using Hibernate. 我正在使用Hibernate在jframe中创建应用程序。 When I try to jump from Login page to sign up button (
onButtonAction
), Java throws the following exception: 当我尝试从登录页面跳转到注册按钮(
onButtonAction
)时,Java抛出以下异常:
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not supported yet.
at librarymanage2.UserSignUp.<init>(UserSignUp.java:34)
at librarymanage2.LoginPage.jButton3ActionPerformed(LoginPage.java:209)
I used this code to jump:- 我用这段代码跳转:-
UserSignUp n=new UserSignUp(this);
n.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
n.setVisible(true);`
This means that the constructor of your UserSignUp
class (somehow) throws an UnsupportedOperationException
, either by itself or via a method call. 这意味着您的
UserSignUp
类的构造函数(本身)会抛出UnsupportedOperationException
,无论是其本身还是通过方法调用。
If you want more help than this, then post more code. 如果您需要更多帮助,请发布更多代码。
Also, open the UserSignUp
class in your IDE's decompiler to see what's happening at around line 34. Well it should be the line that throws UnsupportedOperationException
. 另外,在IDE的反编译器中打开
UserSignUp
类,以查看在第34行附近发生了什么。嗯,应该是抛出UnsupportedOperationException
的行。 See the code right before that, and if there are some conditions leading up to that point. 在此之前,请先查看代码,如果有条件的话,请参见该代码。 In particular, the
this
parameter you're passing to the constructor, perhaps there are some checks on it, and as a result the class decides that the operation on this object is not supported and so it throws. 特别是,您要传递给构造函数的
this
参数,也许对其进行了一些检查,结果类决定该对象的操作不受支持,因此抛出该异常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.