Solved

Java - BorderLayout Issues

Posted on 2010-09-18
2
297 Views
Last Modified: 2012-05-10
There is this darn white box on the right of my program that won't go away. I had it there originally but now I want it gone and it's not going away!

The main part I look at is the init().

Here is what I mean:

USTZX.png

See that whitespace to the right? ugh!! <_<

Here is my code: http://www.dasdfsdg.pastebin.com/es2WMbgV
0
Comment
Question by:UrbanTwitch
2 Comments
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 33710088
your game panel only paints the game grid.
In your case the actual panel is larger than just the game grid
you can paint the background using something like this:

g.setColor(Color.black());
g.fillRect(getWidth(), getHeight());
0
 
LVL 5

Author Comment

by:UrbanTwitch
ID: 33710107
AH YES! Good catch good good catch. :D
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now