不使用JDialog如何使用JDialog

发布于 2024-12-02 04:26:33 字数 370 浏览 3 评论 0原文

很抱歉这个奇怪的标题,但这是解释。 所以我有一个包含学生列表的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

勿忘心安 2024-12-09 04:26:33

我不明白为什么你不想使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文