不使用JDialog如何使用JDialog
很抱歉这个奇怪的标题,但这是解释。 所以我有一个包含学生列表的 StudentRepository 类,这些学生是在 GUI 上(通过 TableModel)选择的。 Student对象的属性是:
int studentid
string name,surname
List<Absent> absents
List<ClassRoom> classes (as in classroom)
所以我想调用一个在StudentRepository中运行的方法,该方法检查学生是否缺勤,然后应该有一个提示,如果可以删除,并且在提示时应该显示缺勤。就像 jDialog 一样。
希望我让自己能够被理解, 哈龙·米尼亚斯
sorry for the strange title, but here's the explanation.
So I have a class StudentRepository with a List of students, which were selected on a GUI (via a TableModel).
Attributes of a Student-object are:
int studentid
string name,surname
List<Absent> absents
List<ClassRoom> classes (as in classroom)
So I want to call a method that runs in the StudentRepository, that checks if if the student has absents then there should be a prompt if it is ok to be deleted and the absents should be shown while promped. Like a jDialog.
Hope I made myself understandable,
Haroun Minhas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不明白为什么你不想使用 JDialog 来执行此操作。这是一个教程。
您可以将任何您想要的内容放入 JDialog 中,甚至是您的缺席列表。
I can't understand why you don't want to use JDialog for doing this. Here's a tutorial.
You can put whatever you want inside a JDialog even your absent list.