Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 502
  • Last Modified:

Space between JPanel and JLabel

How can I make a space between JPanel and the J-components that I place in it.

And how can I also make spaces between them??


Mostly I get the components against each other.
0
RdeLange
Asked:
RdeLange
  • 2
1 Solution
 
alzoid69Commented:
What layout are you  using?  Check out BoxLayout, I think they have seperators.  This is a swing layout.  
0
 
RdeLangeAuthor Commented:
I mostly use the borderlayout
0
 
yongsingCommented:
If you use BorderLayout, then you can use BorderLayout.setHgap() and BorderLayout.setVgap() to set the gaps between the components.
0
 
yongsingCommented:
Why a C grade? If you're not satisfied with the answer, then you should tell us why.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now