Background Image?????


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Background Image?????

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.



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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center