[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Java - BorderLayout Issues

Posted on 2010-09-18
2
Medium Priority
?
327 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month19 days, 5 hours left to enroll

834 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