英文:
Netbeans generated code wont change for Jframe
问题
我正在为我的Java的第一个Jframe项目制作一个非常基本的计算器。为了使我的程序知道选择了哪种操作,我计划使用布尔变量来表示加法、除法等操作。
然而,默认生成的代码将类设置为私有的,所以我尝试通过将生成的代码更改为公共的来修复它,它确认已经更改,但是即使在构建后,代码仍然保持为私有类。
有什么解决方法或更好的方式来实现相同的效果吗?我对Java相对较新。
英文:
I am making a very basic calculator for my first Jframe project in java. For my program to know what operation has been selected i plan on using booleans for add, divide, etc.
However, the default generated code has the classes as private, so I try to fix it by changing the generated code to public, it confirms that it was changed, and yet even after building the code remains as a private class.
Any fix to this or better way to accomplish the same thing? I am relatively new to Java.
专注分享java语言的经验与见解,让所有开发者获益!
评论