How can I add a JScrollPane to a JLabel? Added via add (new JScrollPane (label, two constants)), but the scroll does not work (the icon itself is there, but does not respond to clicks).

  • What do you want to get as a result? Why add a JScrollPane to JLabel? - Mikhail Vaysman
  • @MikhailVaysman, say, to display information for the user with the possibility of vertical scrolling - Andrey
  • Why do you want to display it in JLabel (intended for short messages)? Why not in JTextArea? - Mikhail Vaysman
  • @MikhailVaysman, isn't it (JTextArea) intended for editing and entering text? - Andrei
  • one
    it is designed for large text, editing can be turned off - setEditable(false) - Mikhail Vaysman

0