Solved

Java - BorderLayout Issues

Posted on 2010-09-18
2
305 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

786 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