Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to display the borders in Panels  RSS feed

 
Usman Zafar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please give me some idea that how can i display the Borders in panel. According to my knowledge panels do not have borders.
I can do the same thing by drawing over a panel but the problem arises when i add any component in to the panel ( It speads up).
Please give me all posible solutions except the drawing one.
 
Matt Senecal
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adding borders to JPanels is really easy. Just use the JPanel.setBorder() method:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!