Jump to content

Calling All .. Java Applet Doubt


Recommended Posts

Posted

[quote name='innovative' timestamp='1361844766' post='1303329270']
code lo init function ni ila modify chesi try chesaa... but still image display avvatledhu ... :o

[CODE]
public void init()
{
URL url = getDocumentBase();
picc = getImage(url, getParameter("IMG_0466.JPG"));
MediaTracker mt = new MediaTracker(this);
mt.addImage(picc, 1);
}
[/CODE]
[/quote]
Sai or nanibabu ki pm pettu [img]http://25.media.tumblr.com/tumblr_m68le4eZdM1qb3z8wo3_250.gif[/img]

Posted

[quote name='paampachak' timestamp='1361844506' post='1303329263']
debug cheste telisipotundi ga
[/quote]

debug chesi choosthe ... picc variable null choopisthundhi ...

Posted

cho chweet guys [img]http://25.media.tumblr.com/tumblr_m68le4eZdM1qb3z8wo3_250.gif[/img]

stampede alert issued sSc_hidingsofa

Posted

[quote name='innovative' timestamp='1361844999' post='1303329278']

debug chesi choosthe ... picc variable null choopisthundhi ...
[/quote]
expected [color=#282828][font=helvetica, arial, sans-serif][img]http://i47.tinypic.com/4s086h.gif[/img][/font][/color][color=#282828][font=helvetica, arial, sans-serif] [/font][/color]

Posted

last and final........

import java.applet.*;
import java.awt.*;
import java.net.*;
public class ImageDemo extends Applet
{
private Image image;
private AppletContext context;
public void init()
{
context = this.getAppletContext();
String imageURL = this.getParameter("image");
if(imageURL == null)
{
imageURL = "java.jpg";
}
try
{
URL url = new URL(this.getDocumentBase(), imageURL);
image = context.getImage(url);
}catch(MalformedURLException e)
{
e.printStackTrace();
// Display in browser status bar
context.showStatus("Could not load image!");
}
}
public void paint(Graphics g)
{
context.showStatus("Displaying image");
g.drawImage(image, 0, 0, 200, 84, null);
g.drawString("www.javalicense.com", 35, 100);
}
}

Posted

[quote name='Alexander' timestamp='1361844848' post='1303329272']
picc = null untundhi emo andhukey pic ravatam ledhu error kuda ravatam ledhu [color=#282828][font=helvetica, arial, sans-serif][img]http://i47.tinypic.com/4s086h.gif[/img][/font][/color][color=#282828][font=helvetica, arial, sans-serif] [/font][/color]
[/quote]

debug chesthe adhe vasthundhi ... :o

so something is wrong with image location right ??

Posted

[quote name='@Shadow@' timestamp='1361845074' post='1303329281']
last and final........

import java.applet.*;
import java.awt.*;
import java.net.*;
public class ImageDemo extends Applet
{
private Image image;
private AppletContext context;
public void init()
{
context = this.getAppletContext();
String imageURL = this.getParameter("image");
if(imageURL == null)
{
imageURL = "java.jpg";
}
try
{
URL url = new URL(this.getDocumentBase(), imageURL);
image = context.getImage(url);
}catch(MalformedURLException e)
{
e.printStackTrace();
// Display in browser status bar
context.showStatus("Could not load image!");
}
}
public void paint(Graphics g)
{
context.showStatus("Displaying image");
g.drawImage(image, 0, 0, 200, 84, null);
g.drawString("www.javalicense.com", 35, 100);
}
}
[/quote]

ee code lo java.jpg ane image file ekkada save cheyyali ... koncham adhi cheppu ...

Posted

[quote name='HAPPYNESS' timestamp='1361844945' post='1303329275']
Sai or nanibabu ki pm pettu [img]http://25.media.tumblr.com/tumblr_m68le4eZdM1qb3z8wo3_250.gif[/img]
[/quote]

@3$%

Posted

[quote name='innovative' timestamp='1361845219' post='1303329286']

ee code lo java.jpg ane image file ekkada save cheyyali ... koncham adhi cheppu ...
[/quote]

http://youtu.be/csKGwM6SkvQ

  • Upvote 1
Posted

[quote name='CITI' timestamp='1361844159' post='1303329240']
Neenu vellanu :)
[/quote]

iythe vundu .. solve ayyedhaka .. :)

Posted

[quote name='@Shadow@' timestamp='1361845320' post='1303329288']
[media=]applet video[/media]
[/quote]

Thanks much shadow ... :) solved !!

@all :
my mistake was ...
1) image file ni bin folder lo pettali .. nenu src folder lo petta ...
2) image extension jpg iythe jpeg ani icha ..

tq all S%Hi

Posted

[quote name='Brahmi' timestamp='1361844151' post='1303329238']


Vadu radu... Spamming ki ee thread aa ani vethukutunte idi dorikindi anta....[img]http://i47.tinypic.com/4s086h.gif[/img]
[/quote]

:0

Posted

[quote name='innovative' timestamp='1361844999' post='1303329278']

debug chesi choosthe ... picc variable null choopisthundhi ...
[/quote]

aithe file input kinda teeskovali emo pic ni render cheskodaniki

×
×
  • Create New...