• Post Reply Bookmark Topic Watch Topic
  • New Topic

Border together with GridBagLayout  RSS feed

 
Emil Karlsson
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is there anyone who knows if there are any methods to set a border togehter with a GridBagLayout, in any other way than to add a JPanel to every cell?
What I would like to do is a Grid in a workspace, to guide the user in a DragDrop situation.
/Emil
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code below paints directly on the container using GridBagLayout... the only problem I noticed was that there is no grid size until components start getting added to your layout. So, as components were added the grid would change...

Is this something like what you wanted?


[ October 01, 2002: Message edited by: Nathan Pruett ]
 
Emil Karlsson
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Nathan!
For the moment it works just the way I like it.
/Emil
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!