Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Somethings wrong with my drawImage

$
0
0
 public void paintComponent(Graphics g){
        	g = f.getGraphics();
        	Graphics2D g1 = (Graphics2D)g;
        	g.drawImage(bg,0,0,null);
        	while(isRunning){
    			try{
    				for(int i = 0; i < living.size(); i++){
    				Spawn s = living.get(i);	
    				int x = (int) s.getX();
    				int y = (int) s.getY();
    				g1.drawImage(s.getImage(), x,y,null);
    			
    				}
    				 
    			Thread.sleep(15);
    			}catch(Exception ex){
    				
    			}
    		}
         }


Posted Image
Click on the Image in uploaded here..
you can see that it always print and its not bouncing and moving..

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>