Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (120)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  trouble importing bitmap  (Read 1416 times)
0 Members and 1 Guest are viewing this topic.
Offline Alakazam

Senior Newbie




Java games rock!


« Posted 2004-11-02 19:08:56 »

Alright, I'm trying to import a bitmap to display using JFrame. Here's my paint method:

public void paint(Graphics g) {
     BufferedImage oil = loadImage("oil.bmp");
           
           g.drawImage(oil, 800, 600, this);
     }

My compiler is telling me that the draw Image method can't take in a BufferedImage...am I doing something wrong?


Oh, yeah, and here's what I'm importing:

import javax.swing.JFrame;
import javax.imageio.ImageIO;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.net.URL;
8: Undefined index: online
File: /home/jgo/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 161