Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Java - BorderLayout Issues

Posted on 2010-09-18
2
Medium Priority
?
325 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 92

Accepted Solution

by:
objects earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

647 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