-1

I am using a GUI to display information about "members" in my program database. I want to display a user bio, but it is getting cut off. How do I make my JLabel longer, or allow for it to use multiple lines?

Thanks!

  • Show your tried code please. – Mengjun Nov 19 '13 at 03:16
  • Please show code and tell details. Let us understand your problem more fully if possible. – Hovercraft Full Of Eels Nov 19 '13 at 03:16
  • Yes, I'm afraid a fuller description of your problem and what you have tried to solve it is necessary. I *think* I know what you want and even how to solve it, as I'm sure Hovercraft does, but it isn't even worth it to type it up unless we know more about what you're doing. – arcy Nov 19 '13 at 03:19

2 Answers2

0

The length depends on the layout manager and how you use it. You can also use setPreferredSize(Dimension preferredSize). For the multiple lines part, I think your question has already been answered here

Community
  • 1
  • 1
corneliu
  • 656
  • 13
  • 37
0

JLabel extends JComponent; I believe you want to use setPreferredSize(Dimension size).

Elliott Frisch
  • 198,278
  • 20
  • 158
  • 249