How can i display an image in a canvas where full of Graphics2D component?

i just learn to use Graphics2D components, but my boss ask edme to replace all the rectangles by some folder image in application's canvas... Gee! i got stuck there for 2 days
could u help me please?

the problem is i drew some Rectangles on the canvas ("g2.draw(new Rectangle2D.Double(x, y, rectWidth, rectHeight));") and now the requirment is to replace all these Rectangles to some image (the folder icon image i made with photoshop "folder.jpg")
what am i suppose to do?? i cant find any method to make this amendment.
reagarding to the drawImage() method could u please send me some sample code to demonstrate how to implement that? i am trying to understand all paramaters like (BufferedImageOp/ ImageObserver ) but i still cant get it.
i am a new guy in java programming, please help me out here, thanks a lot!

Similar Messages

  • How can i display a image file which is placed in the applications server

    Hi all,
    Can any one help me how can I display a image file which is present in the application server.
    With regards,
    M.Ramana Murthy

    hi,
    *& Form TOP_OF_PAGE
    * text
    FORM F_TOP_OF_PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = IT_LISTHEADER
    i_logo = Logo name
    * I_END_OF_LIST_GRID =
    ENDFORM. "TOP_OF_PAGE
    rgds
    Anver

  • How can I Display a Image with tiff format in Jpanel?

    How can I Display a CMYK Image with tiff format in Jpanel ? Not in ScrollingImagePanel? Thank you in advance.

    Why nobody can help me?I am very anxious!help me,please!

  • How can I display an image from a shared-network folder?

    Hi
    Does anyone know how I can display images from within APEX that are found outside the database? What configuration have I missed?
    Within Windows-Internet-Explore I can access the following image using the below URLs, BUT I cannot access it from within APEX?
    What do I need to do so APEX can display theses images from our internal shared network folder?
    both these URLs work within Firefox (but on APEX):
    \\Saremote\UPDOWNFILES_DIR\polk_insight.gif
    file://///Saremote/UPDOWNFILES_DIR/polk_insight.GIF
    So within APEX I have created a "display as Text' Item that works with this "amazon image" syntax:
    {lessthan} IMG SRC= {doublequot} http://g-images.amazon.com/images/G/01/associates/navbar2000/logo-no-border(1).gif {doublequot} {greaterthan}
    BUT sadly not with my image:
    {lessthan} IMG SRC= {doublequot} file://///Saremote/UPDOWNFILES_DIR/polk_insight.GIF {doublequot} {greaterthan}
    Any ideas would be appreciated.
    Thanks
    Steve
    Edited by: [email protected] on Sep 12, 2008 8:30 AM
    Edited by: [email protected] on Sep 12, 2008 8:31 AM
    Edited by: [email protected] on Sep 12, 2008 8:32 AM
    Edited by: [email protected] on Sep 12, 2008 8:33 AM

    If you have a local html file, or open an image locally from the menu, then yes, it works, but with web pages that are served from a remote location (web server), security kicks in and prevents the web page from accessing local files (and files on a networked drive).
    you will either have to put the image on the web server and access it through http, or you can load it into the database/workspace images and access it that way.

  • How can I display three images in video rate succession (60 Hz)?

    For a structured illumination microscope application, I have developed a VI that creates three images and displays them in rapid succession (as fast as the loop will go) on a second monitor.
    From the naked eye it's pretty apparent that the loop is not displaying the images at video rate.  Is there a way (perhaps with some sort of buffer) to get them to display faster?  Is WinShow simply not going to be fast enough, and if not, what's an alternative method of displaying the images?  If it helps, the images need only be displayed once each (the loop was just for testing).
    Also, what is a way to measure the frame rate output of the images?
    (sorry for the sloppy code, new to LabView)
    Thanks,
    -T
    Attachments:
    illuminationpattern.vi ‏31 KB

    Hello,
    Why don't  you try drawing one window, call IMAQ WindShow once outside of the loop, then redraw that window each iteration within the loop.  Hopefully this stops the flutter of the window.  You can build a 3 element array of the 3 IMAQ images then use an index array to alternate through which image you want to be redrawn into the single window.  The constant calling of IMAQ WindShow seems messy.
    Regards,
    Isaac S.
    Applications Engineer
    National Instruments

  • How can i Display my images in cover flow view in Keynote?

    I am working on a project .I am on Mavericks . I need to make a presentation of my project ideas . My project involves showing some images in cover flow view . So, is there any way i can show my images in cover flow view in keynote or pages app or by using any other app .

    Keynote is an screen based presentation application
    Pages is a page layout application for print output
    Coverflow is a viewing option of the finder to look at the contents of a folder
    To create a slideshow of your images, open Keynote and drag and drop images from a folder into the Navigator pane then press the play button
    The Navigator panel is the side panel on the left

  • How can I display an image in AWT Panel

    notes: I can't use swing, don't tell me something relate to swing, I need to use pure AWT

    Load it with [url http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Toolkit.html#createImage(java.net.URL)]Toolkit.createImage or [url http://java.sun.com/j2se/1.5.0/docs/api/javax/imageio/ImageIO.html]ImageIO
    Subclass Canvas
    [url http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Graphics.html#drawImage(java.awt.Image,%20int,%20int,%20java.awt.image.ImageObserver)]Graphics.drawImage

  • How can i display an image as background in JFrame ?

    Please give me one demo program...!
    Thanks,
    Madan

    I can give you lots of demo programs [url http://onesearch.sun.com/search/onesearch/index.jsp?charset=utf-8&qt=background+image&rf=0&ref=http%3A%2F%2Fforum.java.sun.com%2Fthread.jspa%3FthreadID%3D668691%26tstart%3D0&rt=1&nh=10&cs=0&col=developer-forums]here

  • How can I display images that are not included in any collection?

    How can I display images that are not included in any collection (some filter or smart collection)? A smart collection with parameters "Collection - contains - empty field" does not work. Lightroom 5.

    Thank you! Good idea! I ordered letters of the alphabet (space separated), and it works.

  • How can I display images in drop down.

    Hi All,
    How can I display images in drop down.
    <select><option>image here</option></select>
    please reply soon.
    anser please
    Thanks

    I have not found html forum..That's just incredible.
    where can i find it ?Sorry, I'm still recovering from that remark.
    please reply soonEvery time you end a post with this, or "urgent" or other such keywords, the forum automatically introduces a 5 minute delay so that will actually make the whole process slower (not faster).

  • How can i display image in RTF template when Oracle Apps running in Windows

    Can any body help how can i display image in RTF template when oracle apps running in Windows Server.
    Thanks
    Ravi

    Hi Ravi,
    You can add images into your rtf template using MS Word Insert Picture feature.
    Did you try this method?
    Thanks
    Ravi
    [email protected]

  • Help!How can i draw an image that do not need to be displayed?

    I want to draw an image and save it as an jpeg file.
    first I have to draw all the elements in an image object.I write a class inherit from Class Component,I want to use the method CreateImage,but I get null everytime.And i cannot use the method getGraphics of this object.Thus i can not draw the image.
    when i use an applet,it runs ok.I use panel and frame,and it fails.
    How can i draw an image without using applet,because my programme will be used on the server.
    Thank you.

    you could try this to create the hidden image
    try
              GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
              GraphicsDevice gs = ge.getDefaultScreenDevice();
              GraphicsConfiguration gc = gs.getDefaultConfiguration();
              offImage = gc.createCompatibleImage(100, 100);
              offG = offImage.getGraphics();
          catch(Exception e)
              System.out.println(e.getMessage());
          }

  • How can I attach an image without the image is in the email body? (using the new mail the Lion)

    How can I attach an image without the image is in the email body? (using the new mail the Lion)
    I want in attachment, not in the body mail.

    I think your only solution is to zip the image files first and then attach them.
    Read this from a site I found:
    Sending Graphical Attachments -- When you attach a graphical image to your message, the recipient of your message sees the image inline (that is, in the body of the message) if her email client supports inline display. ("Take Control of Email with Apple Mail" contains a table listing the capabilities of popular Mac and PC email clients.) If a client does not support inline display (or the recipient has turned off the inline display option), the file appears as an attachment that must be opened in a separate program.
    On the one hand, an inline image is easier for the recipient to see - all she has to do is look at it. On the other hand, inline images can be frustrating to scroll through. If you do not wish to send a graphical image inline, you must compress the file before attaching it - Mail, sadly, lacks a built-in compression option, though fortunately for Panther users, the Finder offers Zip compression without requiring a separate application.
    Note that when you compose a new message, Mail always shows attachments in the body of your message. You can manually drag them somewhere else, but many email clients display all attachments in a separate list, regardless of where you place them in the message body.
    If you paste an image into a message or drag & drop an image from another window (say, a Web browser), Mail converts the raw image data to an attachment in TIFF format. On the other hand, if you drag & drop the icon of an image file (or use the Attach button to locate the file using the file browser), Mail leaves the attached image in its original format. This difference is significant, because although most email clients can display JPEG images just fine, support for TIFF - especially in non-Mac email clients - is less common. If possible, I suggest attaching image files as opposed to pasting or dragging in raw image data.

  • Re: How can I post an image?

    Merging the hints, how does this look?
    Showing an image in Apple Discussions requires two things.
    1. The image has to exist and be accessible from a working server somewhere.
    2. Then the image can be referenced in html and will appear in your post.
    1. To achieve the first you need to register on one of the many free web photo hosting sites. An example of one would be Flicker. (If you have your own web site you can of course host your picture there.)
    Having taken a snapshot of the thing in question (the image), perhaps by using the Grab application on your Mac, you upload the image to your photo hosting site.
    You'll then need to get its URL from the site. It might be easy to see or you might have to read the site's FAQ for those details, as there are differences between sites.
    Easier still, if you are using Safari or Firefox right clicking (or Control click with a one button mouse) on the uploaded image will copy the link for you.
    It will have a form like this:
    http://farm3.static.flickr.com/2186/24541163585b68ff68b8s.jpg
    When you find it, open a new tab in your browser and paste it into it, to check that it displays and is therefore the correct URL for the image.
    2. To add this image to your post here on Apple Discussions, place an exclamation point before and after the link, illustrated as,
    !http://farm3.static.flickr.com/2186/24541163585b68ff68b8s.jpg&#033;
    which produces the image in the post.
    !http://farm3.static.flickr.com/2186/24541163585b68ff68b8s.jpg!
    An alternate html format is;
    <img src="http://source.address.of.image.jpg"/>

    How can I post an image? (Revision 2. Thanks to rrcharles)
    Showing an image in Apple Discussions requires two things.
    1. The image has to exist and be accessible from a working server somewhere.
    2. Then the image can be referenced in html and will appear in your post.
    1. To achieve the first you need to register on one of the many free web photo hosting sites. An example of one would be Flicker.
    Having taken a snapshot of the thing in question (the image), perhaps by using the Grab application on your Mac, you upload the image to your photo hosting site.
    You'll then need to get its URL from the site. It might be easy to see or you might have to read the site's FAQ for those details, as there are differences between sites.
    Easier still, if you are using Safari or Firefox right clicking (or Control click with a one button mouse) on the uploaded image will copy the link for you.
    It will have a form like this:
    http://farm3.static.flickr.com/2186/24541163585b68ff68b8s.jpg
    When you find it, open a new tab in your browser and paste it into it, to check that it displays and is therefore the correct URL for the image.
    2. To add this image to your post here on Apple Discussions, place an exclamation point before and after the link, illustrated as,
    !http://farm3.static.flickr.com/2186/24541163585b68ff68b8s.jpg&#033;
    which produces the image in the post.
    !http://farm3.static.flickr.com/2186/24541163585b68ff68b8s.jpg!

  • How can you add an image in Mail without being an attachment?

    How can you add an image in Mail without being an attachment?
    In otherwords I'd like to put my logo in the email not as an attachment but as an image.
    Is there a simpel solution to this problem?

    PBN1 wrote:
    How can you add an image in Mail without being an attachment?
    You don't.
    It's not possible. The e-mail protocol is designed for text; anything else has to go as an attachment.
    Different mail clients (such as Mail.app, the mail client bundled with Mac OS X) may have different ways of handling such attachments, but they are still attachments. Each mail client has its own rules and methods, so one may display a picture as if it were in the body of the message, but another client may do something completely different.
    A way of faking it is to format your message in HTML (which is a kind of text). The image is hosted on a remote server, not added to the message; instead, you include a link to it in the body of the message, as you would when building a web page. (This is also what the two tips helpfully provided by X423424X do, except that the link to the image is added in the signature, rather than the body of the message.) What exactly happens to it is, again, at the discretion of the mail client. In my case, for instance, displaying images in HTML messages is turned off, and will stay resolutely off.

Maybe you are looking for

  • Alignment failed Officejet Pro 8500 Premier

    Hi, I own a HP Officejet Pro 8500 Premier and the problem begun while printing a color document. The yellow disapeared. It's been about a month I changed all the ink cartridges. I use the printer regularly but not on a heavy usage. (about 7000 pages

  • Invoice number against incoming payment in report

    Dear Experts, I want to know if we can add the reference of the column invoice number in the customer ledger of SAP against the incoming payment number which we have taken the against those invoices.  these are on account payments done which are reco

  • Java EE 5.0 for LINUX vs. Windows

    Hello, I am beginner. Just to be sure I would like to ask whether JAVA EE 5.0 specification is fully implemeted for LINUX as well as for Windows. I need to be sure that if I will create some JAVA EE application and I will tun it on Glassfish AS on Wi

  • Download result in MD4C to Excel?

    Hello, I would like to download the result of an MD4C run into Excel, but the normal download to file menu is grey. Is there a way to make this possible? rgds GAR

  • Can someone explain the speed?

    I upgraded from the 40mb service to the 80mb service - as I was receiving 38mb speeds & the tester said a minimum of 75mb for my line, I signed up for the increase (renewing the contract for 18 months). After the upgrade my speed did increase by 10 t