• Post Reply Bookmark Topic Watch Topic
  • New Topic

JScrollPane - More than One Component

 
Shiva Kumar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to add two JList or two JTextArea in a one JScrollPane, Can anybody help me out how to do?
I did but it does not show any components in the JScrollPane area.
Thanks in advance
Shiva.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add all your components to a panel first, and then add that panel to the scrollpane.

-Nate
 
Shiva Kumar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nathan Pruett,
Thanks. Its works fine.
Shiva.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!