Putting jpegs and gifs into an applet???  - new programmer

I am a new programmer trying to learn how to put jpegs and gifs into my applet. I am using a paint method to draw pictures. Is there a way that I can insert jpegs and gifs into this at certain x and y coordinates?
Thanks.

http://java.sun.com/docs/books/tutorial/uiswing/painting/usingImages.html

Similar Messages

  • Jpeg and gif images are not fuzzy

    How can I import jpeg and gif files so that they are crisp and not fuzzy?  I have Lifecycle Designer 7.0
    T

    Look at the bottom of this page as well [http://carlback.blogspot.com/2007/12/apex-and-3rd-party-js-libraries.html]
    Patrick Wolf
    Carl,
    the only drawback with #WORKSPACE_IMAGES# and #APP_IMAGES# is that it doesn't get cached by the browser. So each page request will transmit the hole file again. A caching option for the "Static Files" in the Shared Components would be nice :-)
    About lazy loading with the #WORKSPACE_IMAGES#. I could think about a mod_rewrite rule which translates the additional file request of the JS library into a valid request for APEX.
    Carl Backstrom
    In 3.1 we emit a last modified header now for uploaded files so that should help with browser caching.
    I wonder if anything's changed since then.
    Kofi

  • Why won't jpegs and gifs open

    Can anyone tell me why jpegs and gifs that are in a document created in Word for Windows won't open in Word for Mac. This is a huge problem for me because I have webpages that I created in Word for Windows and when I edit them in Word for Mac I loose the graphics.

    Word for Windows is a really poor webpage editor. It assumes everyone in the world uses Internet Explorer, and does not take the precautions of following standard HTML coding. A webpage document created in word may work in only Internet Explorer and maybe a few other web browsers.
    My suggestion is to learn HTML and/or use a webpage editor known to follow w3.org standards to the letter like http://www.barebones.com/ BBEdit. You can try several other web browsers for the Mac as well:
    http://www.macmaps.com/browser.html
    Disclaimer: Reference to links I make to my Macmaps.com website are a for your information only type reference. I do not get any profit from this page, and it is open to the public.

  • Can no longer copy and past jpg and gifs into InDesign from c:\user\doc\pics

    Here is the error message we get when doing a copy and past from the hard drive to InDesign.
    Error Message from InDesign:
    Adobe InDesign may not support the file format, a plug-in that supports the file format may be missing...
    First, do I need to add a plug-in to be able to copy and past jpgs and gifs?
    Second, we have always used clip organizer with no problem. Ability to copy and paste jpg & gif suddenly stopped. We get a box but no image ont the page. Have already tried dumping temp internet files through internet explorer. Have already un & re installed InDesign and repaired and fixed everything I could think of.
    Third, we can use the place command to place jpgs but can not place gifs.
    William (Helping Mrs. White)

    It sounds as if Mrs White needs to search visually for graphics and then place them. She can either set Windows Explorer
    to thumbnail view and drag a graphic on to an InDesign page - this will in effect be placing the graphic, not copying
    and pasting, and is the right way to go. Or she can use File > Place, and set the view in the Explorer window that she
    selects from in the Place command to a thumbnail view to see the graphics.
    GIFs can be placed. They are not a recommended format, but if you are placing clip art then you may have no option.
    So, in answer to your original question, no, you don't need a plug-in to place JPEGs and GIFs. But note that is place,
    not copy and paste.
    k

  • Copy and Paste into Java Applet

    I know there have been some posts like this in the paste, but could not find a reasonable explanation.
    JVM 1.4.2_08
    For an unsigned java applet (Swing) I could not copy from a notepad document into my applets JTextField and JTextArea fields.
    JVM 1.5
    For this same applet (Swing) running under 1.5, I could copy and paste from the notepad document into my applets JTextField and JTextArea fields.
    Does anybody know why the difference?
    Is there a way to copy and paste for applets running in the 1.4.2 jvm?
    Thanks.

    I think it must be some security restriction.
    Set a policy for the applet or sign it:
    Set a policy (windows):
    C:\Program Files\Java\j2re****\lib\security\java.policy
    under grant {
         permission java.security.AllPermission;
    this means that you give all permission to all code, if you only want to give permissions for applets
    comming from google you can add the following:
    grant codeBase "http://google.com/-" {
         permission java.security.AllPermission;
    to sign
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post

  • I used to be able to drag jpgs and gifs into the text block

    I used to be able to drag pics and animated gifs into my text block and now I cannot. Does anyone know why this is or how I can correct this? Version 3.5.1 Ichat
    Thanks!
      Mac OS X (10.4.7)  

    Do you have the View Mode set to Preview?
    Are you clicking the Point Control for the point you want to move before clicking on the Canvas?
    MtD

  • Putting a rollover gif into an iweb template

    hi, i am using iWeb for the first time and have created my website using a template but i want to add a gif to the page so when people roll over it, the picture changes. i have made the gif in photoshop and image ready and can only export it as an html file with 2 linked image files which works fine in a browser on its own but i can't find anywhere in iweb to place the html file. i can't 'drag and drop' it as i have been able to with everything else. there might be a really simple solution and if anyone knows it, i would very much appreciate your help!
    G5   Mac OS X (10.3.9)  

    hi there james,
    thanks very much for your help.
    the link you posted is pretty much exactly what i'm trying to do.
    yes i'm on .Mac, have posted it as you said:
    http://homepage.mac.com/benhillisdesign/shockrollover/shockingroll.html
    and this is where i want to put it:
    http://web.mac.com/benhillisdesign/iWeb/%3Abenhillisdesign%3A/PLAY.html
    you can see i currently have an animated gif in there, i just want to replace that with my new rollover gif.
    thans again for your very quick reply, i look forward to the next step...
    cheers,
    ben
    Are you hosting your site on .Mac or another host?
    Either way, at the very least you'll need to upload
    the HTML files that you have now to your server. If
    you are hosting with .Mac, then the easiest place to
    put this is on your iDisk/Sites/ folder. This would
    be the first step in getting the stuff into your iWeb
    page. As you can see, it isn't going to be as simple
    as drag and drop like for regular images. But it
    won't be that difficult either. You'll be doing a
    bit of editing of the iWeb generated HTML files.
    I assume that you have all the files associated with
    this image in a folder. Just copy the whole folder
    into iDisk/Sites/ and you should be able to access
    the image with a browser using the following URL
    format:
    http://homepage.mac.com/username/foldername/index.html
    username = your .Mac account username
    foldername = the name of the folder you copied to
    iDisk/Sites/
    index.html = the name of your default start file.
    Anyways, once you have gotten the image folder copied
    to your iDisk/Sites/ folder or your server, post back
    and let me know the URL that you use to access the
    image. We can go from there...
    Here's an example of something similar on my iWeb
    pages...
    http://web.mac.com/jwtseng/iWeb/kate/MyWorld/F6991CBD-
    9280-4D0F-8563-5BD9FACE8BC6.html

  • IWeb doesn't show JPEGs and PDFs after move to new computer.

    I bought a new Mac mini (running OS X 10.8.2), moved all files from the old one, installed the most recent Domain.sites file from the old computer into the new computer's User/Library/Application Support/iWeb, but now iWeb opens with all embedded .jpg and .pdf files missing and a long list of "missing file" error messages appearing on startup. All of the .html, .png, .gif, .css and .js files appear to be working O.K. Everything in the "Sites" folder is unchanged since iWeb worked perfectly in the old computer. What can I do to fix this?

    Version 1.1.2. I didn't realize until you asked and I checked, that iWeb has been discontinued and I must have transferred my version over from my old computer along with all the other applications. I see I can still buy an old CD version of iLife '09 from third-party vendors that includes iWeb '09, which is presumably version 3.0 and upgradable to 3.0.4 -- near as I can tell the last version before the program went out of production. Evidently iWeb 1.1.2 has compatibility issues with OS X Mountain Lion? I don't want to buy iWeb '09 (the other components of iLife '09 are useless, since 2012 versions were shipped with OS X 10.8) unless I can get some assurance it will work with my existing files. I have RapidWeaver 4.4.2 but I don't have time to recreate everything from scratch. It's frustrating that there's evidently no way to export all the work I've put into my iWeb website over the years into a form that can be edited using other web design software. Or is there? I bought RapidWeaver expecting to be able to open and edit my iWeb files. It's all HTML and JavaScript, isn't it? Why aren't all my files interchangeable between web design programs?

  • Resize JPEG and GIF'S Images - JSP

    Java greetings!
    Somebody knows as can make to create an image pequena(sendo the miniature), without losing quality?
    therefore I am making upload of images, that are recorded in the DB... are wanting to make in the following way: thus q the user to make upload of the image, is created a miniature of the image and kept original(having been image GREAT).
    Somebody can help me? or to indicate some classroom and examples so that it can make this?
    Since already I am thankful!

    how I make to use the thumbnail Classroom with my Servlet, therefore the thumbnail classroom uses parameters of String and the binary Servlet. as to decide this?
    Since already I am thankful!
    package com.brutus;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import javax.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class BlobUploadServlet extends HttpServlet{
    private static String dbUserName = "root";
    private static String dbPassword = "";
    private static String urlDb = "jdbc:mysql://localhost/test";
    private static final char CR = 13;
    private static final char LF = 10;
    protected String boundary = null;
    protected Hashtable params = new Hashtable();
    public void doPost( HttpServletRequest request,HttpServletResponse response )
    throws ServletException, IOException{
    ServletOutputStream out = response.getOutputStream();
    ServletInputStream in = request.getInputStream();
    BufferedInputStream bin = new BufferedInputStream(in);
    boundary = getBoundary(request.getHeader("content-type"));
    out.println("<html><body><pre>");
    out.println("boundary =\n"+boundary);
    out.println();
    byte[] bytes = new byte[128];
    in.readLine(bytes,0,bytes.length);
    String line = new String(bytes);
    Hashtable header = null;
    while(in.readLine(bytes,0,bytes.length)>=0){
    line = new String(bytes);
    if(line.startsWith("Content-Disposition:")){
    out.println(line);
    header = parseHeader(line);
    updateParams(header);
    }else if(line.startsWith("Content-Type:")){
    params.put("Content-Type",
    line.substring("Content-Type:".length()).trim());
    }else{
    if(header!=null&&bytes[0]==13){
    if(header.containsKey("filename")){
    displayParams(out);
    out.println(" ...saving payload");
    savePayload(params,bin);
    header = null;
    }else{
    String name = (String)header.get("name");
    String value = getParameter(in).trim();
    params.put(name,value);
    }if(line.indexOf(boundary)>=0)
    out.println(line);
    bytes = new byte[128];
    out.println("</pre></body></html>");
    out.close();
    private void displayParams(ServletOutputStream out)
    throws java.io.IOException{
    for (Enumeration e = params.keys();e.hasMoreElements();) {
    String key = (String)e.nextElement();
    out.println(" "+key+" = "+params.get(key));
    private void updateParams(Hashtable header){
    for (Enumeration e = header.keys();e.hasMoreElements();) {
    String key = (String)e.nextElement();
    params.put(key,header.get(key));
    private String getParameter(ServletInputStream in)
    throws java.io.IOException{
    byte[] bytes = new byte[128];
    in.readLine(bytes,0,bytes.length);
    return new String(bytes);
    private String getBoundary(String contentType){
    int bStart = contentType.indexOf("boundary=")+"boundary=".length();
    return "" + CR + LF + "--" + contentType.substring(bStart);
    private void savePayload(Hashtable params,BufferedInputStream is)
    throws java.io.IOException{
    int c;
    PushbackInputStream input = new PushbackInputStream(is,128);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    while ( (c=read(input,boundary)) >= 0 )out.write( c );
    //int id = Integer.parseInt((String)params.get("ID"));
    saveBlob((String)params.get("filename"),out.toByteArray());
    out.close();
    private int read( PushbackInputStream input, String boundary )
    throws IOException
    StringBuffer buffer = new StringBuffer();
    int index = -1;
    int c;
    do {
    c = input.read();
    buffer.append( (char)c );
    index++;
    while ( (buffer.length() < boundary.length()) && (c == boundary.charAt(index)) );
    if ( c == boundary.charAt(index) ){
    int type = -1;
    if ( input.read() == '-' )
    type = -2;
    while ( input.read() != LF );
    return type;
    while ( index >= 0 ){
    input.unread( buffer.charAt(index));
    index--;
    return input.read();
    private Hashtable parseHeader(String line){
    Hashtable header = new Hashtable();
    String token = null;
    StringTokenizer st = new StringTokenizer(line,";");
    while(st.hasMoreTokens()){
    token = ((String)st.nextToken()).trim();
    String key = "";
    String val = "";
    int eq = token.indexOf("=");
    if(eq <0) eq = token.indexOf(":");
    if(eq >0){
    key = token.substring(0,eq).trim();
    val = token.substring(eq+1);
    val = val.replace('"',' ');
    val = val.trim();
    header.put(key,val);
    return header;
    public void saveBlob(String description,byte[] out){
    String cmd = "INSERT INTO Photos (Description,Image) VALUES(?,?)";
    System.out.println(cmd);
    try {
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection(urlDb,dbUserName,dbPassword);
    PreparedStatement pstmt = con.prepareStatement(cmd);
    pstmt.setString(1, description);
    pstmt.setBytes(2, out);
    System.out.println(pstmt.executeUpdate());
    con.close();
    catch(ClassNotFoundException e){
    e.printStackTrace();
    catch(SQLException e){
    e.printStackTrace();
    }

  • Why doesn't itunes have an simple upload option for putting CDs and DVDs into my ipod touch library?

    I have movies and CDs I don't want to have to purchase again through itunes that I would like to put on my ipod touch without a lot of complicated hassles. I don't understand why it isn't a simple point and click and it happens option on my itunes library list of options. I have four kids and a ton of work and don't have time or expertise to spend figuring out how to make that work by reading through manuals. I don't see the point in buying the same music or movies or books twice. I work in a job that allows me to listen to my ipod while I work. This is a huge perk for an otherwise tedious and boring job, but I don't have time or money to spend buying extra movies or reading a ton of technical information trying to figure this all out. If they can do all the other stuff they do with an ipod touch I don't see why this request should be a serious challenge.
    I took a guess on my operating system. I don't know. Do you see the huge list of operating systems? That seems like a lot. It seems to me that everything should be compatible with everything else or people like me that expect to be able to do what other systems can do get really frustrated and irritated when we realize that we can't because capabilities and limitations where not emphasized in the advertising.

    HA! I'll add it to my favorites bar... then maybe I will be able to find it again. I just hope I can remember the password and username. You know that they aren't secure unless you change them every six months. Do you realize how many different computer systems and programs I have to engage in work and for personal use?! How in the heck am I supposed to remember all my passwords and usernames?! Oh, and it's not safe to write them down... especially with a bonehead like me that has too many irons in the fire and can't remember where he put his keys!

  • I can not put music and video into itunes............

    unknown error occurred(-50)
    how can I fix it?thanks
    1   Windows XP  

    Welcome to Apple Discussions!
    Is this when purchasing music/videos, trying to import them from another location on your computer, or trying to transfer them onto the iPod?
    btabz

  • Photoshop CS6 Saving JPEGs as GIF's???

    I am doubble clicking my .jpg images from Bridge CS6 into Photoshop CS6 to downsize the image and after i change the image to move across to a forum elsewhere.
    The Save As" option gives me all the normal file. options, i click the drop down bar and select JPEG, and then automatically the .jpg image above turns into a .gif file???
    I have closed out and tried resaving on several different images of mine and keep getting this .gif once selecting the JPEG, and- .gif setting if i select ok to go forward with the.gif.
    I want to save as a simple
    JPEG with a size 8 for web forum purpose.
    Whats with this?
    Please help with this, is it a bug??
    Thanks
    Here is the screen pic.-->
    Sorry about the blurryness if you click the image it wil enlarge. Cheers
    OSX
    10.6.8
    CS5 Master Collection Suite Owner &
    Lightroom 4.
    ******UPDATE- Going through all different file formats, saved everything as something different.
    Saving my image as .Photoshop Raw- Saved my Photo as a JPEG then i got to choose size 8 - ok. Done.
    Definatley a BUG!!***** in file saving!!!******

    To be perfectly clear, you CAN use the Extra Plug-ins Folder specification to point to a separate folder you've created where you have put ONLY your 3rd party plug-ins.  It can be a neat way to help organize plug-ins, especially if you don't prefer to copy things into your Photoshop installation area.
    Just don't point it anywhere in the installation area for another version of Photoshop.
    The basic problem is that many folks, in trying to save time, choose to point their Extra Plug-ins Folder setting to the plug-ins subfolder inside their old Photoshop installation area, thinking that will just make them all available to the new version.  The key thing is that the old versions of Photoshop ALSO had put their own Adobe-supplied plug-ins there.  The conflict arises when the new version of Photoshop starts and tries to enumerate the plug-ins, including those found in the Extra Plug-ins Folder, it finds overlap between its own plug-ins and the old ones it finds there.
    -Noel

  • IPhoto won't import jpeg or gif, or any common photo types, from backup CD

    I recently had my hard drive replaced. I had backed up all of my photos on a CD, but iPhoto gives an error message when I try to import some of the jpegs and gifs to the new HD: "The following files could not be imported (they may be an unrecognized file type or the files may not contain valid data". Is this a software issue?

    Back up your iPhoto library, Depress and hold the option (alt) and command keys and launch iPhoto - rebuild your iPhoto library - start at the first option and try each one in order
    LN

  • Inserting current pathname and filename into Pages documents?????

    Pages help explicitly says you can put "filenames" and "pathnames" into formatted text fields just as you can put in page numbers and the date. It does NOT tell you how to do this!!! What do I type so that my current pathname appears in pages? Or the current filename of my document?? I am trying to create a template so that filename, pathname, date, and number of pages always appears in the header.

    Well, it is possible to automatically insert the document's filename into the header as I routinely do it in (dare I say) Microsoft Word and Microsoft Excel. I write many documents long and short. For each of them I start with the same template, one that includes the filename and the date "last saved" in the header.
    Those who have an ironclad hierarchy where every file is unambiguously filed into one folder might easily be able to retrieve every file. For me, it is very useful to know the filename of the document I am searching for (as it is on my hardcopy) and to know that it is "sept-mon-rpt-final" and not "sept-mon-rpt-mikes-edits". As my example suggests, the greatest utility of this is for version control.
    I do not want to type my filename into every draft document, I want them to insert themselves in the header in the same manner that Pages inserts the current date. This information, filename and pathname, is in the Mac system. Indeed, there is a reference to it in the Pages documentation.
    In Pages'08 Help - the page titled: "Working with Document Parts" under "using Headers and Footers" it says, "Add headers and footers to give your documents page-by-page identity by showing the date and time, page number, or filename and pathname."
    When you click on the link that says "Using Headers and Footers" you are taken to that page, where it says, "you can put your own text or graphics in a header or footer, and you can use formatted text fields. Formatted text fields allow you to insert text that is automatically updated. For example, inserting the date field shows the current date whenever you open the document. Similarly, page number fields keep track of page numbers as you add or delete pages."
    After this you hit a dead end.

  • Already have a GIF file,put it in Edge Animate and make into an embedded web file on my site? how?

    Hi there,
    Im new to this particular programme. I use PS, Illustrator, AE and PP quite a lot,
    However i have never used Adobe Animate and have tried for the last few days using online videos etc..
    Here is my issue...
    I have a GIF already. When i put it on my Wordpress site it only plays once and doesnt carry on...
    I need to animate it into an embedded file i think? HTML.. etc
    I have the GIF file. i also have the frames from the Gif as JPEGS...
    I dont know how to simply import the gif or jpegs and render off as a html web video...
    Please help me?
    I know this is vague and my undertsanding of this particular programme is not great but i use other adobe products daily and feel i just need a bit of help to get me going..
    Many Thanks
    Sophie

    Also
    - how was the animated .gif created? If you are not seeing it loop the creator must have the loop playback set to 0 when it was created. Example Photoshop frame based animations has the option to set the loop to 0 or indefinite or a predefined set x of times; Fireworks also has a similar option. So somewhere along the way loop back is off in your file.
    - You could open the animated gif file in Ps or Fireworks reset the loop to indefinte.
    - Since you have the indivual frames you  can also import them into Ps as separate layers, then control the playback options as you wish. (http://helpx.adobe.com/en/photoshop/using/creating-frame-animations.html)
    - 'render off as html web video'?? Please elaborate.
    How does Edge Animate fit into what you are wanting to achieve?
    Darrell

Maybe you are looking for

  • Vines won't play in my FF35, 36, 37.

    Updates didn't change anything. Clips appear to load but they won't play, all I can see is just static image. Main options like: media.mediasource.mp4.enabled media.fragmented-mp4.enabled media.fragmented-mp4.exposed media.windows-media-foundation.en

  • Object and Mouse Movements on Limited Inverse

    I am attempting to make a more interesting background for a page that involves several objects moving slightly, depending on the 'x' coordinate of the mouse. I am trying to limit the movement to 100 pixels at the inverse of the mouse's 'x' coordinate

  • Displaying all the dates eventhough there no value

    Hi Experts, I designed Month to date sales query, its showing day wise sales, requirement is when we don't have any sales on that perticular day that date will not appear(because we are getting data from cube if there no date there obviously we won't

  • Send form from numbers via email

    when trying to share my form via email it shares the spreadsheet not the form? How can i send the form?

  • I am using MAC OS X 10.7.5 i want to update to 10.8

    Can any One Help it out .. How to upgrade the to 10.8