做出两个选项 window 的最佳方法是什么?
What is the best way to make a two option window?
这是制作名称为 JLabel
且下面有两个 JButton
组件的 window 的最佳方法。
我是 Swing 的新手,我尝试了一些方法,但对任何方法都了解不多。
你建议我把注意力集中在做这件事上吗?
这样的DYM?
还是这个?
实际上,第二个来自第一个评论中链接的页面。
But, you might be over complicating the issue and a JOptionPane
might be a more suitable solution - see How to make dialogs for more details.
这是制作名称为 JLabel
且下面有两个 JButton
组件的 window 的最佳方法。
我是 Swing 的新手,我尝试了一些方法,但对任何方法都了解不多。 你建议我把注意力集中在做这件事上吗?
这样的DYM?
还是这个?
实际上,第二个来自第一个评论中链接的页面。
But, you might be over complicating the issue and a
JOptionPane
might be a more suitable solution - see How to make dialogs for more details.