Problem with display of images in applets

Ads
 

Problem with display of images in applets

View Answers

June 6, 2008 at 6:03 PM

Hi frined,

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

public class ImageExample extends Applet{
Image img;
MediaTracker track;
public void paint(Graphics g) {
track = new MediaTracker(this);
img = getImage(getCodeBase(), "rose-one.jpg");
track.addImage(img,0);
g.drawImage(img, 0, 0, this);
}
}

---------------------------------------

<HTML>
<HEAD>
<TITLE>Display image in Java Applet</TITLE>
</HEAD>
<BODY>
This is the applet:<P>

<APPLET code="ImageExample.class" width="400" height="450">

</APPLET>
</BODY>
</HTML>


--------------------------------------

Read for more information.

http://www.roseindia.net/java/example/java/applet/PlaySoundApplet.shtml


Thanks

Ads









Related Tutorials/Questions & Answers:
Problem with display of images in applets - Applet
Problem with display of images in applets  Hi all, When I run... in figuring out the problem....  Hi frined, import java.applet.*; import..., this); } } --------------------------------------- Display image in Java Applet
how to display multiple images on browser
how to display multiple images on browser  i want to display multiple images on brower including string values from sql database using jsp
Advertisements
how to display multiple images on browser
how to display multiple images on browser  i want to display multiple images on brower including string values from sql database using jsp
Applets?
Applets?  applets are using now a days   Please visit the following link: Applet Tutorials
Display Multiple Images in jscrollpane using Java Jpanel
Display Multiple Images in jscrollpane using Java Jpanel  Browse and Display multiple images in vertical view of java jscrollpane using jpanel
display multiple images from postgres database in jframe
display multiple images from postgres database in jframe  i just want to display multiple images on jframe by firing a query on postgres database
How to display multiple images in jsp
How to display multiple images in jsp  <%@ page import="java.io....()); System.out.println("st-7 "+brr); // display the image response.setContentType("image... "); } } catch (Exception e) { out.println("Unable To Display image"); out.println
Jfreechart chart display problem
Jfreechart chart display problem  Using JSP and Jfreechart displays the chart fine on an internal browser in eclipse but doesnt display it on Chrome...(request.getParameter("q")); String query="select dateof,dayinprice,company from stockprice
Integer display problem
Integer display problem  class Bean{ int n1,n2; public Bean(){ } public Bean(int n1, int n2){ this.n1=n1; this.n2=n2; } public...); } } In above program value of n1 should display 10. But it is displaying 8. what
applets
Java Applet  when i performing the output as appletviewer.filename.java the applet window is opening and it shows that start applet not initialized. please give me solution for this problem.   just
select Query result display problem
select Query result display problem  Hi, String SQL_QUERY ="from Cc"; Query query = session.createQuery(SQL_QUERY); for(Iterator it=query.iterate();it.hasNext();){ Object[] row = (Object[]) it.next
this code will be problem it display the error again send jsp for registration form
this code will be problem it display the error again send jsp for registration form  I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE RESEND THE CODE org.apache.jasper.JasperException: java.lang.NumberFormatException
this code will be problem it display the error again send jsp for registration form
this code will be problem it display the error again send jsp for registration form  I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE RESEND THE CODE org.apache.jasper.JasperException: java.lang.NumberFormatException
Applets
Applets
Applets
Applications and Applets
Applications and Applets       Now a days, Java is widely used for applications and applets. The code... the user's browser. Applets can be very useful, user friendly programs or can
jsp images
jsp images  hi I had done a demo application using jsp. And i tried to display some images which is located in the server folder. It has done.... But it doesn't get displayed in chrome and Mozilla. What's the problem
display
display  please tell me how to display the content from database.. if we click on any image using servlets/jsp...please
regarding images in jsp
regarding images in jsp  Hi, When I am trying to display an image in jsp, i am getting the image of bar charts in webroots/jspchart/web... me out in fixing the solution for my problem? Thanks in advance
Images in java
Images in java  how to handle images in java
images - JDBC
images  i have image if someone click on image it will display big but the problem is i want a bye link button on that page ..  Hi Friend, Try the following code: function increase(img1){ div
how to display image with listview
how to display image with listview  How can i display the list view with the related images from database
Free Java Applets
Free Java Applets       There are many free java applets available on the web that you can use in your website. These applets includes menu, clock, slide show, image animation
Applets in Java
Applet is a Java program embedded within HTML pages. Java applets is compatible with almost all the web browsers like Mozilla Firefox, Google Chrome, Internet explorer, Netscape navigator and others that are java enabled. Applets
Moving The Images
Moving The Images  How to moving multiple images in one frame using swings
images upload
images upload  I use netbeans IDE 6.8 How i upload any image from any folder to web page
problem in coding
problem in coding  i have a following code which display the contents... FileReader("myprogram1.java"); not possible to display the content...); fr.close(); possible to display the content of myprogram.txt
Display Tag
Display Tag  Hi Here is My code, There is problem At line no.3, where i want to display two fields in one column but it gives error.. Please any one knows the solution must reply Thanks In Advance
Display Tag
Display Tag  Hi Here is My code, There is problem At line no.3, where i want to display two fields in one column but it gives error.. Please any one knows the solution must reply Thanks In Advance
in php installation problem ?
in php installation problem ?   php installation in 7th step did not display y/n dialog box how to solve the problem

Ads