Adding image on panel

My applet is in 5 panel and I would like to add an image to my South panel. How can I do this?

Try this,
class p1 extends Panel
Image image;
public canpan(Image img)
image = img;
public void paint (Graphics g)
if (image == null)
return;
g.drawImage(image, 0, 0, this);
}

Similar Messages

  • Adding image to panel gives an error

    any ideas whatz wrong with this
    Panel p = new Panel();
    Graphics g = getGraphics();
    g.drawImage(splashImage, 0,0, p);
    add(p,BorderLayout.CENTER );
    the error i get is
    "AWT-Windows" (TID:0x14bda60, sys_thread_t:0x56a0cb8, state:R, native ID:0x540) prio=5
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(WToolkit.java:130)
    at java.lang.Thread.run(Thread.java:479)
    "SunToolkit.PostEventQueue-0" (TID:0x14bde28, sys_thread_t:0x569f970, state:CW, native ID:0
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:417)
    at sun.awt.PostEventQueue.run(SunToolkit.java:406)
    "AWT-EventQueue-0" (TID:0x14be1f0, sys_thread_t:0x5673818, state:CW, native ID:0x270) prio=
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:417)
    at java.awt.EventQueue.getNextEvent(EventQueue.java:216)
    at java.awt.EventDispatchThread.pumpOneEventForComponent(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEventsForComponent(EventDispatchThread.java:89)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:84)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:76)
    "SymcJIT-LazyCompilation-0" (TID:0x14ae228, sys_thread_t:0x4a1cf90, state:CW, native ID:0x4
    at SymantecJITCompilationThread.DoCompileMethod(Native Method)
    at SymantecJITCompilationThread.run(JITcompilationthread.java, Compiled Code)
    "SymcJIT-LazyCompilation-PA" (TID:0x14ae1f0, sys_thread_t:0x4a1b9e8, state:CW, native ID:0x
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:417)
    at SymantecJITCompilationThread.run(JITcompilationthread.java, Compiled Code)
    "Finalizer" (TID:0x14a9590, sys_thread_t:0x4964e10, state:CW, native ID:0x4dc) prio=8
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:105)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:120)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:167)
    "Reference Handler" (TID:0x14a9338, sys_thread_t:0x4961460, state:CW, native ID:0x598) prio
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:417)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:107)
    "Signal dispatcher" (TID:0x14a9370, sys_thread_t:0x4960130, state:R, native ID:0x55c) prio=
    "main" (TID:0x14a9420, sys_thread_t:0x2f2888, state:CW, native ID:0x528) prio=5
    Monitor Cache Dump:
    sun.awt.PostEventQueue@14BDE28/153CBC0: <unowned>
    Waiting to be notified:
    "SunToolkit.PostEventQueue-0" (0x569f970)
    java.lang.ref.Reference$Lock@14A9348/14DEB30: <unowned>
    Waiting to be notified:
    "Reference Handler" (0x4961460)
    java.awt.EventQueue@14BE108/153C848: <unowned>
    Waiting to be notified:
    "AWT-EventQueue-0" (0x5673818)
    SymantecJITCompilationThread@14AE228/1505068: <unowned>
    Waiting to be notified:
    "SymcJIT-LazyCompilation-PA" (0x4a1b9e8)
    java.lang.ref.ReferenceQueue$Lock@14A92F0/14DEEB8: <unowned>
    Waiting to be notified:
    "Finalizer" (0x4964e10)
    Registered Monitor Dump:
    SymcJIT Method Monitor: <unowned>
    SymcJIT Lazy Queue Lock: <unowned>
    Waiting to be notified:
    "SymcJIT-LazyCompilation-0" (0x4a1cf90)
    SymcJIT Method Monitor: <unowned>
    SymcJIT Method List Monitor: <unowned>
    SymcJIT Lock: <unowned>
    utf8 hash table: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class linking lock: <unowned>
    System class loader lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Monitor cache lock: owner "Signal dispatcher" (0x4960130) 1 entry
    Thread queue lock: owner "Signal dispatcher" (0x4960130) 1 entry
    Waiting to be notified:
    "main" (0x2f2888)
    Monitor registry: owner "Signal dispatcher" (0x4960130) 1 entry

    Following is the code i am using
    i create an instance of this class in another class.
    when i run this class, i get to see only a blank window but no image on that...
    any ideas!!
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import javax.swing.*;
    class SplashWindow extends Window
         Label l;
         Label l2;
         Label l3;
         Label l4;
         SplashWindow(Frame parent)
                   super(parent);
                   Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
                   Rectangle winDim = getBounds();     
                   setSize(300,200);
                   setLayout(new BorderLayout());
                   //l = new Label(" Solutions Demo");
                   //l.setFont(new Font("",1,20));
                   Image splashImage = Toolkit.getDefaultToolkit().getImage("spalsh.jpg");
                   //add(l, BorderLayout.WEST);     /* Center the window */     
                   JLabel label = new JLabel(new ImageIcon(splashImage));
                   add(label, BorderLayout.CENTER);     
                   setLocation((screenDim.width - winDim.width) / 2,     (screenDim.height - winDim.height) / 2);     
                   setBackground(Color.gray);     
                   setVisible(true);
                   try
                        Thread.sleep(4000);
                        dispose();
                   catch (InterruptedException ie)

  • Adding "Image menu/panel"

    Hey all,
    I used to work with Photoshop elements but recently upgraded to CS4. To put my problem short, i work with 50~100 pictures at a time. I crop them and add some light, so i need to have them somewhere where i can open them easy right? Well photoshop and its default settings just toss them on upper side which is kind of ok, but id like to add an panel downside where i can scroll down and choose the picture i want to. I tried to get fixed with "Arrange Documents" button and it turned out to be almost what i wanted, but not quite. Here is screenshot which i took to clear things out a bit =>
    http://koti.welho.com/epunavaa/photoshop.png
    (The red squares would be mini-images of the images that i use and there would be 9~10 each line, and you could scroll down for more)
    Thank you

    Hey all,
    I used to work with Photoshop elements but recently upgraded to CS4. To put my problem short, i work with 50~100 pictures at a time. I crop them and add some light, so i need to have them somewhere where i can open them easy right? Well photoshop and its default settings just toss them on upper side which is kind of ok, but id like to add an panel downside where i can scroll down and choose the picture i want to. I tried to get fixed with "Arrange Documents" button and it turned out to be almost what i wanted, but not quite. Here is screenshot which i took to clear things out a bit =>
    http://koti.welho.com/epunavaa/photoshop.png
    (The red squares would be mini-images of the images that i use and there would be 9~10 each line, and you could scroll down for more)
    Thank you

  • Background layer seizes added images.

    I am trying to create a photo collage by scratch (not using "Collage"). First I create a new blank page for the background and save it. It is shown as "locked" with a padlock. Then I open an image file (.jpg) to add to the background layer, and I get a message that I need to unlock the background layer so I click to unlock it. However the added image locks onto the background layer and doesn't make a new layer. If I open another image file it locks on top of the others.

    The Layers panel only shows the layer(s) belonging to the currently active file. You need to arrange your image windows so that you can see your composite image as well as the source. With the source image active the Layers panel will show the source - click and drag that layer to the composite.
    So in the following, the violet image is the active image and I drag its layer to the white image I've created for my collage. In the composite image with the new layer selected I can position it where I want. Select each of the other images in turn and do the same. Refer to my previous note, you can also do this with Copy & Paste.
    When finished, your composite image and its Layers panel will look like this:
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • Error while adding Image: ORA-00001: unique constraint

    Dear all,
    I have an error while adding images to MDM I can´t explain. I want to add 7231 images. About 6983 run fine. The rest throws this error.
    Error: Service 'SRM_MDM_CATALOG', Schema 'SRMMDMCATALOG2_m000', ERROR CODE=1 ||| ORA-00001: unique constraint (SRMMDMCATALOG2_M000.IDATA_6_DATAID) violated
    Last CMD: INSERT INTO A2i_Data_6 (PermanentId, DataId, DataGroupId, Description_L3, CodeName, Name_L3) VALUES (:1, :2, :3, :4, :5, :6)
    Name=PermanentId; Type=9; Value=1641157; ArraySize=0; NullInd=0;
    Name=DataId; Type=5; Value=426458; ArraySize=0; NullInd=0;
    Name=DataGroupId; Type=4; Value=9; ArraySize=0; NullInd=0;
    Name=Description_L3; Type=2; Value=; ArraySize=0; NullInd=0;
    Name=CodeName; Type=2; Value=207603_Img8078_gif; ArraySize=0; NullInd=0;
    Name=Name_L3; Type=2; Value=207603_Img8078.gif; ArraySize=0; NullInd=0;
    Error: Service 'SRM_MDM_CATALOG', Schema 'SRMMDMCATALOG2_m000', ERROR CODE=1 ||| ORA-00001: unique constraint (SRMMDMCATALOG2_M000.IDATA_6_DATAID) violated
    Last CMD: INSERT INTO A2i_Data_6 (PermanentId, DataId, DataGroupId, Description_L3, CodeName, Name_L3) VALUES (:1, :2, :3, :4, :5, :6)
    Name=PermanentId; Type=9; Value=1641157; ArraySize=0; NullInd=0;
    Name=DataId; Type=5; Value=426458; ArraySize=0; NullInd=0;
    Name=DataGroupId; Type=4; Value=9; ArraySize=0; NullInd=0;
    Name=Description_L3; Type=2; Value=; ArraySize=0; NullInd=0;
    Name=CodeName; Type=2; Value=207603_Img8085_gif; ArraySize=0; NullInd=0;
    Name=Name_L3; Type=2; Value=207603_Img8085.gif; ArraySize=0; NullInd=0;
    I checked all data. There is no such dataset in the database. Can anybody give me a hint how to avoid this error.
    One thing I wonder: The PermanentId is allways the same but I can´t do anything here.
    BR
    Roman
    Edited by: Roman Becker on Jan 13, 2009 12:59 AM

    Hi Ritam,
    For such issues, can you please create a new thread or directly email the author rather than dragging back up a very old thread, it is unlikely that the resolution would be the same as the database/application/etc releases would most probably be very different.
    For now I will close this thread as unanswered.
    SAP SRM Moderators.

  • Apple have a big flaw adding images to Apple TV coding error.

    Hi all, it seems Apple have a big flaw in there new version of itunes 8.2.0.23.
    So heres the problem if you have a Apple Tv system. Adding images is great however the softwares flaw is when you have a lot of images. i have over 3000, and tick boxes apear half way in the list, for know reason.
    i have add a link to show you guys and girls a screen shot...
    can anyone from apple sort this out?
    it really bugging me. as it happens of vista, xp, windows 7, and osx.
    Cheers
    Adam
    null

    apple don't monitor the forums for bug reports... this is a user-to-user support forum.
    you should report it via the official method - http://www.apple.com/feedback/appletv.html

  • Adding Images to the List component

    Adding Images to the List component while using the FLV
    PLayback
    All, ( i can send you my source files if it would help)
    I'm using the FLV Playback component and loading videos into
    it from an external xml file. I also have a list component tied to
    the FLV playback that when you click on one of the elements in the
    list, it plays that movie.
    QUESTION:
    My question is how do I add an image to the list component?
    Below is the xml file and the actionscript. I've added the image
    attribute to the XML file as img="time_square.jpg" and added the
    element of the array when calling/creating the list. Did I do this
    right?
    Any direction would be very much appreciated.

    Adding Images to the List component while using the FLV
    PLayback
    All, ( i can send you my source files if it would help)
    I'm using the FLV Playback component and loading videos into
    it from an external xml file. I also have a list component tied to
    the FLV playback that when you click on one of the elements in the
    list, it plays that movie.
    QUESTION:
    My question is how do I add an image to the list component?
    Below is the xml file and the actionscript. I've added the image
    attribute to the XML file as img="time_square.jpg" and added the
    element of the array when calling/creating the list. Did I do this
    right?
    Any direction would be very much appreciated.

  • Adding images and buttons without a frame appearing

    I would like to add images to some of my pages without having them appear in a frame. I would like to place some transparent gifs on the page to use as buttons for hyperlinks. I would also like to have some photos (with transparent backgrounds that appear on the page and are not surrounded by a picture frame. Any Suggestions

    iWeb seems to default to stroking newly-added images and shapes. Pages (iWeb's close relation) includes a way to change the default appearance, but I can't find anything similar in iWeb. You can, of course, remove the stroke using the Graphic Inspector (just set Stroke to None). Transparency in gifs and photo images is supported. Just drag into iWeb or use Insert > Choose... Again, remove the stroke if this appears.

  • Image Editing panel

    Hi,
    I am trying to remove red-eye in a picture but cannot find
    the red-eye tool in Fireworks MX 2004 (which is no longer supported
    by technical assistance). The help menu is that it is in the "image
    editing panel" under the "windows" menu. I cannot find it. Please
    help.
    Desperate website manager in RI

    raymcharl wrote:
    > Hi,
    >
    > I am trying to remove red-eye in a picture but cannot
    find the red-eye tool in
    > Fireworks MX 2004 (which is no longer supported by
    technical assistance). The
    > help menu is that it is in the "image editing panel"
    under the "windows" menu.
    > I cannot find it. Please help.
    >
    > Desperate website manager in RI
    >
    Tools panel, within the Rubber Stamp tool set.
    Jim Babbage - .:Community MX:. & .:Adobe Community
    Expert:.
    Extending Knowledge, Daily
    http://www.communityMX.com/
    CommunityMX - Free Resources:
    http://www.communitymx.com/free.cfm
    .:Adobe Community Expert for Fireworks:.
    news://forums.macromedia.com/macromedia.fireworks
    news://forums.macromedia.com/macromedia.dreamweaver

  • Adding Image to Search Results

    Hi
    I am dire need of adding images to search results, particularly the thumb of the resulting product(s). The tags TAG_NAME and TAG_DESCRIPTION work, but TAG_SMALLIMAGE doesn't. Any help would be much appreciated.
    Thanks, Teejay

    The CSS in http://dandeliongiftshop.businesscatalyst.com/StyleSheets/ModuleStyleSheets.css is causing that overlap.
    Search for the below style rule in the above CSS file and make suggested modifications:
    .cataloguetitle {
        color: #732772;    font-family: Arial,Helvetica,sans-serif;
        font-size: 14px;
        font-style: normal;
        font-weight: normal;
        position: fixed;          --remove this
        display: block;          --add this
        text-align: center;     --remove this
        text-align: left;          --add this
    Should look better.

  • Adding Image problems

    Having some problems adding images.
    I was able to add the Ubuntu server image mentioned in the install guide and it is working 
    It appears on the nodes palette and I can create a topology with it and boot it.
    I was also able to add CSR image csr1000v-universalk9.03.13.00a.S.154-3.S0a-ext.qcow2 to the server.  
    However the CSR icon isn't available on the node palette.  How do I fix this?
    How to add other vmdk or ovf style images?  
    I have a network emulator that runs as a VM and comes as a vmdk.   I tried installing it and I get the following message ...  -Cannot create image "server-DummyCloud": Failed to convert image to QCOW2: Command '['qemu-img', 'convert', '-O', 'qcow2', '/tmp/tmpnfp_m_', '/tmp/tmpWk3al7']' returned non-zero exit status 1
    Where can I find compatible NXos images?  

    No change.
    Still get the message ..
    Cannot create image "server-DummyCloud": Failed to convert image to QCOW2: Command '['qemu-img', 'convert', '-O', 'qcow2', '/home/virl/dc.vmdk', '/tmp/tmpmgCkzK']' returned non-zero exit status 1
    I"ll open a tac case.

  • Adding images to a slide show

    I'm sure this has been asked a bazillion times here but I'm
    so new to Flash (we're talking a couple of days) that I wouldn't
    know what to search on much less what question(s) to ask. That
    having been said I'm tasked with adding images to an existing Flash
    site that has 4 slide shows (it's for a photographer). I have all
    of the .fla files and I can successfully change an image but when
    it plays it's taller than the other existing images (even though
    they are the same height in pixels) and I'm sure fixing that is
    just a couple of clicks.
    He said with false self-confidence...
    I have other, more specific, questions but it's better to ask
    them in
    this
    image to be more clear about what I'm referring to (without
    knowing the correct terminology).
    I know Photoshop, ImageReady, Illustrator and GoLive (so I'm
    no knucklehead) but Flash is a whole new ball game so I apologize
    for my ignorance. Once I get up to speed with Flash I won't be
    asking dumb stuff like this.
    As a sidebar question what's the best way to get up to speed
    with Flash? Is Lynda.com any good?
    TIA

      I had to restart and opened the file. It asked me if I wanted to try to recover the operations in process before. I said yes. Then it gave me this error which was similar to one of the first two errors I got but did not write down.
    [SQLC/interOpen] SQLError: ‘Error #3125: Unable to open the database file.’, details: ‘Connection closed.’,operation: ‘open’, detailID:’1001’

  • Suggestion: Adding a "Pages Panel" in Edge Reflow, similar to Adobe Fireworks

    Hello Adobe Team:
    I realize ER is mostly to set up fluid layout prototypes, which so far I'm loving this software.  Especially the feature of your align panel. 
    But, I have a suggestion that I would love to see implemented in the near future. 
    Allowing for more than one File to be opened in ER
    Adding a "Pages Panel" similar to the Fireworks pages panel
    Master Page
    Pages

    Thanks for the suggestion!  I filed a Feature Request in our public github at: https://github.com/edge-reflow/issues/issues/38
    If you have a free github account, feel free to add additional feature requests there.  Posting them here is fine, too!

  • Adding images files to DVD-ROM

    By adding image files to the dvd-rom when burning my slideshow and movie. Can the photos be put on a desktop for printing after burn is done?

    There's a nice option to add whatever files you choose to the DVD-ROM area using the command to Edit DVD-ROM. Here are instructions:
    http://docs.info.apple.com/article.html?path=iDVD/7.0/en/6693.html
    and a related thread:
    http://discussions.apple.com/thread.jspa?threadID=2136021
    John

  • Adding Image to a Panel

    Dear All,
    I am having one problem. I am having an Applet .i want to add an Image to a panel and that Panel i have to add to Applet. how can add any one help pls.
    Regards,
    Viswa

    Create an image icon ImageIcon icon = new ImageIcon("someimage.gif") and then add this to a label JLabel label = new JLabel(icon) then just add this label to your panel.
    Cath

Maybe you are looking for