Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要能够选择 JLabel 中的文本。我在网上阅读了一些关于使用 JTextfield 模拟 JLabel 的指南,但这对我没有用,因为我的 JLabel 将跨越多行。那么关于如何做到这一点或者是否有可能的任何想法?
您可以使用不可编辑的JTextArea,它允许多行和可选文本,并且在视觉上看起来与JLabel.
JTextArea
JLabel
我不认为这是可能的JLabel(至少我不知道如何)