Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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 2462 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 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;
8: Undefined index: online
File: /home/jgo/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 161