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

How to remove border from GridBagLayout  RSS feed

 
juniad Ahmed
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to AWT technology, so please help with with my problem.
When i create a gridBagLayout(2,2), it creates square of 4 cells with border line dividing each cell. I want to get rid of this border line, how can i achieve this?
 
Campbell Ritchie
Marshal
Posts: 55717
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's a gridBagLayout(2, 2)? Are you using GridLayout?
 
Rob Camick
Ranch Hand
Posts: 2801
15
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Layout Managers do not use Borders, they just postion and size components. You have some other problem.

Post your SSCCE that demonstrates the problem.
 
juniad Ahmed
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, i am using GridLayout. I can see border line between the buttons placed in gridLayout.
Can you see the border or division between the buttons. I want to remove that, I have attached an image as well.
buttons-with-border.JPG
[Thumbnail for buttons-with-border.JPG]
 
Campbell Ritchie
Marshal
Posts: 55717
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What division between the buttons? Isn't that part of the button? It changes from bottom right to top left whenever you depress the button.
 
John Jai
Rancher
Posts: 1776
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post a SSCCE as Rob requested.
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1103
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems to me that you are posting the 'design view' of a GUI builder and not the actual ouput when the program runs...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!