createImage problem

2012-02-24  Source: Original Site  Category:Java  Views:0 

Advertisement

What the hell is wrong? The marked code prints differently in the JBuilder and Explorer.

In explorer:
[email protected]
null

In JBuilder appletviewer:
null
null

What the hell is the problem?????????
Why can't i create an image in the Graph class.

------------------------------------------------------------------
import java.applet.Applet;
import java.awt.*;

public class GraphApplet extends Applet
{

public void init()
{
Image image = createImage(100,100);
System.out.println(image); !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Graph graph = new Graph();
}
}

import java.awt.*;
import java.util.*;

public class Graph extends Canvas
{
private Image image;
public GraphCanvas()
{
setBackground( Color.black );
image = createImage( 100, 100 ); !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
System.out.println( image + "" );
}

public void Paint( Graphics g )
{

}

}

Related articles
  • createImage problem 2012-02-24

    What the hell is wrong? The marked code prints differently in the JBuilder and Explorer. In explorer: [email protected] null In JBuilder appletviewer: null null What the hell is the problem????????? Why can't i create an image in the Graph class.

  • Problems with createImage(...) Help, Please! 2013-02-18

    I've got a class derived from Panel like so: public class ZF_Tools_ScrollablePanel extends Panel { public ZF_Tools_ScrollablePanel(Dimension ps, Dimension ms) { super(); preferredSize = ps; minimumSize = ms; setLayout(null); } ... } I've got another

  • Problem stopping thread (I think) 2012-01-11

    Hope you can help me out with this problem. I am trying to get a bluetooth finder to stop, and start again. What I can see is that the first time it stops and then start again, it work. the next time I do it, nothing happens. When I say it works, I m

  • KeyListener problems 2012-01-15

    guys, I'm new here and a n00b in Java, trying to figure things out though I want to make a polygon move in a Java Applet but I keep struggling with the keylistener (aka it doesn't do anything) Maybe someone can help me please? Here's my code: (I'll j

  • HELP! me on this problem 2014-03-06

    I am new to PHP. I just downloaded php-4.3.1-win32 from php.net and installed it on Win XP. I have also downloaded badblue server and also apache server. On both these servers I am facing these problems. 1. I have a script (Again downloaded from site

  • Facing problem with the Error: NS_ERROR_ILLEGAL_VALUE 2014-04-24

    people! I am a newbie into Ajax and I have surfed a lot to find the solution for my problem but in the end I am sorry to disturb you guys. Well my problem is that when I make request in ajax to fetch the XML file, proper responseXML is not getting ge

  • problem in run my code on eclipse(pulsar) !!! 2014-07-02

    i have problem to run my code in eclipse !!! whene i run this code on netbeans it`s successful runs but on eclipse this error is shown : Null Pointer java/lang/NullPointer Exeption 1. import java.io.IOException; 2. 3. import javax.microedition.lcdui.

  • Display Images Problems 2015-02-01

    Am having bit of writiers block about how to fix this error. Its a assignment for college so am really just looking for tip or pointer in right direction. Its a simple card game similar to poker. Card.java package pokerpkg; public class Card {//Codes

  • GDLib or better: a problem with colors 2015-02-27

    well... the system is an apache running over a win2k server, php is the 4.3.0 installed as apache module using GD2 i have this problem also with previous releases of php and gd or using IIS, the problem is: i dont have colors, but only b&w images

  • createImage() woes 2015-03-11

    I've been converting some applets into full-blown applications (or JPanels to include in a full-blown application) and more than once have run into a problem when it comes to double-buffering. The applets create an image buffer in the init() call. So

  • problem with combining RGB binary images 2015-04-20

    hi. im doing an edge detection which will detect edges of each RGB channel and then combine them to show it as a final output. im now having a problem with combining the three as it doesnt show me a binary image, instead it has some colors on it. i h

  • Steganography problem - image not displayed, Help! 2015-05-17

    I have been creating a LSB steganography application that will hide a file within an image (bitmap) However, when I run the application, a new Jframe appears but with no steganographic image. I have determined that it is not the algorithm that is the

  • What does Frame.show() do to make createImage(w,h) work? 2015-05-22

    this is a bit tricky. I created a temp Frame for the sole purpose of being able to call createImage(w,h). I need to create my Image this way because need to be able to obtain Graphics object from the Image. And as far as I know this is the only way t

  • Ubuntu Big bad problem with libc6 2.6.1 on Feisty 2012-01-01

    I have a big, big problem. While trying to install libqt4-core 4.3.1, I saw that I had an unsatisfied dependency of libc6 2.6. So I went in search of a package for it. I found one via the Ubuntu packages site. I installed it and I do believe that I i

  • $50.00 for solving problem(guaranteed) 2012-01-01

    I will send $50.00 personal check to the one, who will solve the problem below. (The offer is legitimate) Just make it work and do not forget include your mailing address. [email protected] [email protected] You can send solution to the on

  • jQuery Horizontal Scrolling and Tabs problem 2012-01-01

    I'm building single page website with horizontal scrolling script and I want to add tabs (loading external html) to one section. I've managed to place them into a div inside this section but problem is that every time I click on any tab it scrolls ho

  • New to Ubuntu - Problems Connecting To Home WiFi 2012-01-01

    First Post and first install of a linux based OS ever! I just installed UNR 9.10 on my Dell Mini 9. Having a few issues connecting to my home WiFi though. I am at a bit of a loss as most average linux users would register me completly computer illite

  • Download Problem with ORacle 9i from OTN 2012-01-01

    So that we may better diagnose DOWNLOAD problems, please provide the following information. - Server name : East - Filename : 9001NTSrv_Disk1.zip, _disk2.zip, Disk3. - Date/Time - Browser + Version - O/S + Version - Error Msg I tried to download Orac

  • Conglomerate of DB2 9.7 installation problems 2012-01-01

    To whom this may concern, I am facing a couple of serious problems: Under Windows Vista Ultimate 64 bit SP1 with IE 8 I found the following problems: • The Setup Launchpad is defunct – no item in the left pane can be selected – I have to use DB2 Expr

  • Two monitors; same problem? 2012-01-01

    I just recently got given two monitors from the same guy; 1) HP Pavilion f1703 2) Belnea 1935 S1W Both use the standard VGA output but use different power cables - (although I'm sure thats not the problem), when I connect them to a computer both rece