DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    PaWz! Guest

    Background Image?????


    Hi, I am new to Java Programming and am trying to develop a simple maze
    game where a character is moved over a background image.

    My question is, how do I program so the background image stays and doesn't
    refresh each time the player is moved?

    I have programmed the game previously in C++ and the background image doesn't
    refresh, so I am wondering how I can achive this effect.

  2. #2
    michael Guest

    Re: Background Image?????


    In your paint/paintComponents method, try to use XOR operations.
    You may also try to use JLayeredPane. Place your background image
    on one pane and your other images on other panes.

    "PaWz!" <itdconsulting@hotmail.com> wrote:
    >
    >Hi, I am new to Java Programming and am trying to develop a simple maze
    >game where a character is moved over a background image.
    >
    >My question is, how do I program so the background image stays and doesn't
    >refresh each time the player is moved?
    >
    >I have programmed the game previously in C++ and the background image doesn't
    >refresh, so I am wondering how I can achive this effect.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links