I am creating an options dialog using `JOptionPane.showOptionDialog(...)`
When I click one of the buttons added to this dialog, I need a label to apear underneath on the dialog (and this label should be scrollable if necessary). I have written event handlers for the buttons, but I am not sure how to get this label to appear on the dialog.
Any help would be great.
**Update:** I realized that it would be ok if I somehow called `JOptionPane.showOptionDialog(...)` with an initial message, and then when one of the buttons was clicked I would change the message. Is this possible? @llm: Are you that you need JOptionPane.showOptionDialog? Wouldn't subclassing a JDialog be easier?
以上就是Adding a scrollable label to an option dialog的详细内容，更多请关注web前端其它相关文章！