Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

How to create the first image for a program

  Asked By: Jose    Date: Apr 18    Category: Java    Views: 2088

I try to make a program to some
company. so could any one tell me how to create the first image for a
program. what I mean is like when we run Internet Explorer it will
show us the image first which has no frame



3 Answers Found

Answer #1    Answered By: Anthony Smith     Answered On: Apr 18

Java source:

/* ImageApplet.java

import java.applet.*;
import java.awt.*;
import java.net.*;

public class ImageApplet extends Applet{

private image  image = null;

public void init(){
URL imageURL = new URL(getDocumentBase(),"EinsteinBike.jpg");
image = getImage(imageURL);
}catch(MalformedURLException murle){
getAppletContext().showStatus("Image could not be loaded.");

public void paint(Graphics graphics){

html source:
<h2 align="center">ImageApplet</h2>
<center><applet code="ImageApplet.class" codebase = "."
width="244" height="216">
alt="Your browser understands the <APPLET> tag
but isn't running the applet, for some reason."
Your browser is completely ignoring the <APPLET>

<center>Back to the main menu</center>

Answer #2    Answered By: Edna West     Answered On: Apr 18

I loaded that applet at:

from there you can run  it, get the source code and image  file.
Best of wished in your programming.

Answer #3    Answered By: Guilherme Silva     Answered On: Apr 18

you can use the image  function

Didn't find what you were looking for? Find more on How to create the first image for a program Or get search suggestion and latest updates.