• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

White bars on bottom and top of JFrame

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Guys : )

So I'm working on a school project setting up a GUI, and I can't seem to get rid of this problem. Initially I had an issue trying to get the frame background to be a certain color; I was unable to color the frame itself so I just added another panel inside the frame and colored it. Now that I've got the colored frame in, there are two white bars that appear on the bottom and top of the panel that I can't get to go away. I'll include the code below if anyone wants to run it and see what I'm talking about. Just an FYI: I'm using eclipse.

Thanks for all the help!

 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Add these lines at an appropriate place in your code:What do you see?
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The white bars are p1 and p2 - set their colour to something like Color.RED if you want to confirm it. Remove them and the bars go away. Were they a remnant of a previous design or something?
 
Kody Wright
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow, I feel like an idiot lol. Thanks for the help and quick replies!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic