How to import a picture in java

hello can annyone help me with my problem, i have tried various ways to import a picture but i cant seem to find the correct way. Can annyone help me with this problem that would be great. You all have my thanks

Add this class and change the image to your own...
import java.awt.*;
public class Viewer extends Canvas {
     private Image image;
     public Viewer()
          image = Toolkit.getDefaultToolkit().getImage("someDirectory/someImage.gif");
          MediaTracker mediaTracker = new MediaTracker(this);
          mediaTracker.addImage(image, 0);
          try
               mediaTracker.waitForID(0);
          catch (InterruptedException ie)
               System.err.println(ie);
               System.exit(1);
     public void paint(Graphics g)
          g.drawImage(image, 0, 0, this);
}Then in your main program you can call it liek this...
Viewer pic = new Viewer(); Then just add pic to your frame where you want it to appear

Similar Messages

  • How to import a picture in Address Book from iPhoto?

    Hello all,
    How do I import a picture to one of my contact files in Address Book. Before, you could just import one of the pictures from the iPhoto Library, but now after the iPhoto updates, the library seems to be just one file. Were are the original pictures stored?
    Any help welcome, regards and thanks for all the good work on these forums.
    Joost

    No need to "import". Just find the photo in iPhoto (i.e. within the application), click it once so it's highlighted with a blue outline, then select Edit menu > Copy (or just ⌘-C). Go to Address Book, select the contact, click the Edit button at the bottom, click once on the blank photo icon so it's highlighted with a blue outline, then select Edit menu > Paste (or just ⌘-V).
    FYI, the original iPhoto images are stored as individual files, in ~/Pictures/iPhoto Library/Originals/subfolders.
    Hope this helps...

  • How to import a picture into a Psd file using codes?

    I'm trying to import a picture into a psd file as a new layer, but i can't find the method of photoshop object in visual studio 2010 object browser. Is it possible to do this job using vb.net codes?
    Any suggestion will be gratuated!

    I beleive Michael L Hale stated that he used the ScriptListener to generate code for PhotoShop "menu File>Place".  Many things can not be done through in Photoshop Scripting through the Adobe's normal scripting methods Adobe provided for scripting.  However Adobe also supplied  the ScriptListener.8li plugin which when installed is a bit like the actions palette's action recorded without controls.  Everthing that can be recorded in Photoshop is written to two files on your desktop in script code one in Javascript the other VBS.  The Script code use an Action Manager Method so thing not posible with normal scripting methods can be use in scripts.  The only way to start and stop recording these two script files it to install ScriptListener.8li before you start Photoshop and to uninstall it after you exit Photoshop. Awarkward but better then nothing there is no logic just step, step, step like actions and the code is not all that readable.  However you can take that code and modify it to use vars to turn steps into javascript functions and whatever VBS uses.
    For example Place
    REM =======================================================
    DIM objApp
    SET objApp = CreateObject("Photoshop.Application")
    REM Use dialog mode 3 for show no dialogs
    DIM dialogMode
    dialogMode = 3
    DIM idPlc
    idPlc = objApp.CharIDToTypeID( "Plc " )
        DIM desc3
        SET desc3 = CreateObject( "Photoshop.ActionDescriptor" )
        DIM idnull
        idnull = objApp.CharIDToTypeID( "null" )
        Call desc3.PutPath( idnull, "D:\\Temp\\Portrait\\dsc6234.psd" )
        DIM idFTcs
        idFTcs = objApp.CharIDToTypeID( "FTcs" )
        DIM idQCSt
        idQCSt = objApp.CharIDToTypeID( "QCSt" )
        DIM idQcsa
        idQcsa = objApp.CharIDToTypeID( "Qcsa" )
        Call desc3.PutEnumerated( idFTcs, idQCSt, idQcsa )
        DIM idOfst
        idOfst = objApp.CharIDToTypeID( "Ofst" )
            DIM desc4
            SET desc4 = CreateObject( "Photoshop.ActionDescriptor" )
            DIM idHrzn
            idHrzn = objApp.CharIDToTypeID( "Hrzn" )
            DIM idRlt
            idRlt = objApp.CharIDToTypeID( "#Rlt" )
            Call desc4.PutUnitDouble( idHrzn, idRlt, 0.000000 )
            DIM idVrtc
            idVrtc = objApp.CharIDToTypeID( "Vrtc" )
            DIM idRlt
            idRlt = objApp.CharIDToTypeID( "#Rlt" )
            Call desc4.PutUnitDouble( idVrtc, idRlt, 0.000000 )
        DIM idOfst
        idOfst = objApp.CharIDToTypeID( "Ofst" )
        Call desc3.PutObject( idOfst, idOfst, desc4 )
    Call objApp.ExecuteAction( idPlc, desc3, dialogMode )

  • How to import Images/Pictures in BODS??

    Dear Guru
    Just want to know how i can import and process the image in the BODS..
    Any Idea please let me  know.
    Thansk !
    Cheer
    Ravi..

    Hi Ravi,
    You can directly push image to BODS.
    In delimited text files, XML files, and XML messages, blob columns always reference an external file. The notation for this external file is <<filename>>.
    For example, consider a comma-delimited file format that contains the following three columns:
    Column Name
    Data Type
    Product No
    Integer
    Description
    Long
    Image
    blob
    In the following sample row, the blob column references the external file.
    7369,WidgetA transforms questionable data into trusted sources through a singleenvironment.,<<pictures\WidgetA.jpg>>
    You can use blob data types in sources and targets and pass them through transforms.
    Regards,
    M Ramesh

  • How to import DBMS_LOB package in java

    hi
    how we can use pl/sql's package in java
    any body can help me
    where i can found harachy of DBMS_LOB package
    to include in my java or jsp program
    thanx

    perhaps this topic can help :
    Calling PL/SQL from Java
    and the use of DBMS_LOB package is here:
    Supplied PL/SQL Packages and Types Reference Contents / Search / Index / PDF
    http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96612.pdf
    Java Stored Procedures Developer's Guide Contents / Search / Index / PDF
    http://otn.oracle.com/pls/db92/db92.docindex?remark=homepage
    I hope that can help you. Perhaps another person can give the excat code.
    Good luck!
    Joel P�rez

  • How to import RAW picture in iPhoto

    Hi,
    I've just switched my Lumix Fz-18 format from jpeg to raw and I suddenly found out that iPhoto can't import those pics...When I plug it, iPhoto sees the pictures but when I click "import all" it gives me back an error message (sort of unreadable files)...What can I do?

    The Raw format for every model of camera is different, and each model has to be supported individually. At this time the FZ-18 is not supported. The list of cameras currently supported is here
    http://support.apple.com/kb/HT3825
    Let Apple know you want your camera supported:
    iPhoto menu -> Provide iPhoto Feedback
    Alternatives include processing the Raws with the software that came with your camera and exporting the results as tiff or jpeg and importing those, or converting the Raw to DNG with Adobe's Camera Raw and trying to import them.
    Regards
    TD

  • How to import RAW picture in iPhoto with a Panasonic Lumix FZ38?

    I know that the lumix FZ38 is not supported at this time (iPhoto and Aperture), i used the Adobe DNG Converter 5.6 but i can´t import the DNGs into iPhoto/Aperture, but Lightroom and Photoshop can.
    What can i do to import DNG to iPhoto??????

    Francisco
    This may be related to an issue with the recent Camera Raw update. Have a look at this thread from the aperture forum:
    http://discussions.apple.com/thread.jspa?threadID=2274871&tstart=0
    Regards
    TD

  • How to import pictures into excel sheet without using report generation

    Dear Friends
    I want to know how to import the picture or picture file into excel sheet without using report generation..
    kindly come up with any suggestions or example code
    Regards
    Karthick
    Solved!
    Go to Solution.

    Thank you Rajesh 
    i am going through that vi
    Rajesh Nair wrote:
    Please go through below link
    http://zone.ni.com/devzone/cda/epd/p/id/3638
    Eventhough one subVI is missing i think it will be usefull for you.
    Regards
    Rajesh R.Nair
    Rajesh Nair wrote:
    Please go through below link

  • How do I import my pictures on my computer .

    How do I import my pictures from my computer into my Photoshop Elements 11 program so I can tag them ???

    File>Get Photos>From Files and Folders
    Just FYI, this is the user to user forum and people respond when they can. It's not adobe tech support.

  • Can some please provide instructions on how to import an iPhoto library from an old Mac to a new Mac without getting a bunch of duplicates?  I tried transferring my pictures using an external hard drive and then copying it to the Pictures folder on my Mac

    Can someone please provide instructions on how to import an iPhoto library from an old Mac to a new Mac without getting a bunch of duplicates?  I tried transferring my pictures using an external hard drive and then copying it to the Pictures folder on my new Mac.  I ended up getting a bunch of duplicates. My old Mac has an older version of iPhoto while the new Mac has iPhoto '11.  Is that the cause of the problem?  Please advise.  Thanks.

    Simply copy the iPhoto Library from the Pictures Folder on the old Machine to the Pictures Folder on the new Machine.
    Then launch iPhoto. That's it.
    This moves photos, events, albums, books, keywords, slideshows and everything else.
    Regards
    TD

  • I wonder how pro photographers use aperture?I shoot raw and my harddrive is alreay full.I'm not able to import new pictures.Is it ok if i create a vault and delete all my projects in the HD.Can I use an external HD use aperture through the vault??

    I wonder how pro photographers use aperture?I shoot raw and my harddrive is alreay full.I'm not able to import new pictures. I don't know what to do. I created a vault. My plan was to create a vault(put all my master files into an external harddrive) and then delete all my projects in my mac pro's harddrive. Is it the correct way to do it ? What should I do if I have thousands of raw files ? How should my workflow be? Can I use an external HD and use aperture through the vault,without keeping the master files on my computer's hard drive?? Or should I shoot raw+jpeg and store raw files in an external backup harddrive and import only jpegs into my aperture library?

    There's a bit to learn.  It will slowly make sense.
    Aperture is an empty field.  You're given a tractor and a whole bunch of attachments. What you grow, how, and where, is entirely up to you.
    Vaults are for back-up and only for back-up.  They have nothing to do with storing your working files.
    When your Library outgrows your system drive (and for good performance, you should leave c. 20% of every drive empty), it's time to convert some of your image's Masters from Managed to Referenced.  ("Managed" and "Referenced" refer to Masters, not to Libraries.)
    There are hundreds of posts in the forum, and several pages in the User Manual on using Masters.
    Many people run Aperture with the Library on their system disk, and most (or all) of their images' Masters on external FW drives.  This is a good set-up.  Note that you will likely have to take steps to back-up the data on your external drives.
    If you do the above, there should be no reason to delete any Projects.
    The choice of RAW or RAW+JPEG or JPEG depends on the kind of work you are doing.  I capture RAW only -- but I don't do any commercial shoots.  Pros on deadlines report that the RAW+JPEG works well for them.  Capture JPEG if it saves you time.  IMHO, there is not a good reason to shoot JPEG to save space (space is cheap; time expensive).
    Short-term solution: buy and use a FW800 external 1 TB drive, formatted "Mac OS Extended (Journaled)", and using Aperture relocate the Masters of all images older than 30 days to that drive.  (Be sure to change your back-up strategy to include this new drive; you may need a second new drive.)
    This general post of mine might help you understand more about Aperture.

  • How to import custom java jar/class into oracle to be used in java proc ?

    Hi
    I would like to know how to import custom java jar/class files into oracle to be used in java stored procedure.
    I am developing a oracle pl/sql procedure to call java program. The java program will be created as procedure and will be published.
    But, my question is that I do have a other external jar/class file that need to be imported into this java program.
    example
    raise_sal.java
    import java.util.*;
    import oracle.sql.*;
    <<reference other java programs >>
    import cmpmsgsvc.xxxx.* ;
    import cmpmsgsvc.yyyy.* ;
    import cmpmsgsvc.zzzz.* ;
    how do I import the cmpmsgsvc jar/class file into oracle so that I don't have any
    compilation errros on raise_sal.java program ??
    what are the steps to import/compile and validate to do this?
    thanks for your help in advance.
    Thanks
    rrb.

    Kuassi
    Problem is that, I have 6 jar files that are needed to be included in the main java program. And, there are more than 50+ classes, propertiers in those 6 jar files.
    It might be not good idea to have all those 50+ classes in the production database.
    Is there anyway that I keep all those 6 jar files in unix box (our's is oracle erp installation with oracle being installed on unix box) and just refer them in the main java program. I mean database will be loaded with main java program and it should able to refer other 6 jar files from unix.
    if we create a directory and keep all jar files in there and include that directory in classpath variable, does this works? or what is other method?
    Please let me know.
    Thanks

  • How to import java Classes in report Builder 10g

    How to import java Classes in report Builder 10g .....
    Arshad

    Hello,
    To import the Java classes:
    Add your jar in the REPORTS_CLASSPATH
    Launch Reports Builder.
    Note:
    You must launch Reports Builder now so that the new REPORTS_CLASSPATH is used.
    Choose Program > Import Java Classes to display the Import Java Classes dialog box.
    Regards

  • How to import a tcl package in Java

    Hi,
    I want to convert an existing tcl file into a java source file. In my existing tcl file, some tcl packages have been imported, using the syntax
    package requires XML
    where "XML" is the name of a tcl package.
    But I am not sure how to import this tcl package in my Java code. Also, how can i call tcl procedures from Java code. The tcl package file contains a set of tcl procedures.
    Please let me know that
    1> How can I import/call a tcl package in a Java code.
    2> How can I call a tcl procedure in a Java code. The tcl procedure is contained in the tcl package file.

    I have searched the url provided by you. But I couldn't find anything relevant to my requirements.
    They have basically explained about how to call a Java program from a tcl code using java::call command
    But they haven't provided anything related to importing tcl package files inside java source.
    Please let me know your opinion on this issue.

  • How to Import pictures in iphoto on ipad with original name

    How to import pictures into iphoto on my ipad air with the original filenames.
    IT now Seems my pictures get a new name.

    When I sync my photo album (from Aperture or iPhoto) to my iPad using iTunes, the filenames remain the same in iPhoto on the iPad, when I browse synced album. Have you tried syncing with iTunes?
    See this link: iTunes: Syncing photos

Maybe you are looking for

  • HOW DO I DOWNLOAD IPHONE MUSIC & videos to my MacBook Pro?

    What is the exact procedure for downloading my Iphone videos & music to my MacBook Pro.?

  • Withe the new photo upgrade, why can't I edit in Photoshop anymore?

    I just upgraded to the new photo upgrade and I can't edit in Photoshop anymore!!! Help????

  • Deployment connection problems

    I attempting to deploy a java class from Jdeveloper 3.1.1.2 into an Oracle 8.1.6 server on Solaris. My Tnsnames entry works for sqlplus from the PC. I am geeting the following errors when I test the connection: scenario 1: Thin JDBC existing TNS name

  • Gingerbread update -- What's the big deal?

    Having found Froyo to be a very useful update, I was curious what to expect for Gingerbread, so I looked up the Top 10 (according to one ZDNET blogger) Features of Gingerbread:  http://www.zdnet.com/blog/burnette/top-10-features-in-android-23-gingerb

  • Not able to see output file

    Hi All, this is regarding oracle apps, whenever i submit the concurrent program and tries to see the output, output tries to open in new window and closed automatically. not able to view the output, need to go at UNIX Box and then from there i can se