NetBeans生成的代码将不会为JFrame而改变。

huangapple 未分类评论47阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年4月8日 08:03:51
  • 转载请务必保留本文链接:https://java.coder-hub.com/61091340.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定