Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Applet Problem with display of images in applets
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Rupinder
Problem with display of images in applets
1 Answer(s)      6 years and 7 months ago
Posted in : Applet



Advertisement
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


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
display records with images problem - JSP-Servlet
display records with images problem  hello, i am developing HR application whereby i want to display employee records and their pictures on web..., Display images from database to visit ... http://www.roseindia.net/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
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
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
Display Problem
Display Problem  i am creating a small window application , i want to fetch data from ms-access(db) and want to display it on tables. what options are there to show result on table. is CSS helpfull
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
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
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
displaying images and records problem - JSP-Servlet
displaying images and records problem  hi, Thanks for your reply... display any record and image. I posted my question and since then no replay. Please, kindly help me to solve the problem urgently. Or in any other way to do
displaying employee records and their images problem - JSP-Servlet
displaying employee records and their images problem  hi, Thanks for your reply to my question. The code you sent to me yesterday was not working. it doesn't display any record and image. Please, help me out urgent
iterator display problem - Struts
iterator display problem   in action class i store database data in arrraylist but after success how can i display those data in jsp page using... friend, Code to help in solving the problem : Iterator Tag
Problem to display checkbox item
Problem to display checkbox item  Hi, Following is my code: <...; I want to display records, when i click on submit button or any dumy button... it contains same checkboxes. So, from your above code, i can display selected
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
code to display images using 2d array - Swing AWT
code to display images using 2d array  HI !! I have an image file in ascii/binary format (lines & pixels) in the form of a 2d-array. I would like to display this using java code. I am relatively new to coding
How to display images in jsp ffrom sqlserver2000 - JSP-Servlet
How to display images in jsp ffrom sqlserver2000   These code u sent is till not displaying the image in jsp from sqlserver2000. what table has to create under database? what are the fields of table to create
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
JComboBox Display Problem - Java Beginners
JComboBox Display Problem  I am create one program that contain two combo boxes. If first combo box i am display all date. If i select one date from first combo box then the second combo box display some dates based on first
APPLETS - Security
APPLETS  In java applets sun.misc is not working can any body help me for the alternate solution. while using new sun.misc.BASE64Encoder().encode(enc); i got runtime error... java.security.AccessControlException
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
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
Images in java
Images in java  how to handle images in java
Animation in Applets - Applet
you kindly help me out to solve this problem. code: import...; java.util.List images = new ArrayList(); BufferedImage buffImage; Thread
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
 

 

 

DMCA.com