Inserting a picture onto a drawing panel

Hello!
I hope someone can help, basically I have a drawing panel which shows shapes. Instead of just a shape I would like to know if there is a way it can show a picture instead....
Thanks for your help!
Charlie

Here is the code i have so far:
private void cmdStartActionPerformed(java.awt.event.ActionEvent evt) {
        x = 150;
        y = 20;
        int w = 30;
        int h = 30;
        panDraw.draw(cboShape.getSelectedIndex(), x, y, w, h);
        txtRemaining.setText("until landing");
        timer = new Timer();
        timer.schedule(new LowerShip(),
                0,        //initial delay
                1*1000);  //subsequent rate
    class LowerShip extends TimerTask {
        int Height = 10;
        public void run() {
            for ( int Height=0; Height<10; Height++ ) {
                x = 150;
                y = y + 30;
                int w = 30;
                int h = 30;
                panDraw.draw(cboShape.getSelectedIndex(), x, y, w, h);
                txtTimeLeft.setText(" ");
                txtTimeLeft.setText(9 - Height + " seconds");
                txtHeightLeft.setText(" ");
                txtHeightLeft.setText(67.5 - Height * 7.5 + " metres");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e){
                timer.cancel();
    }I would like to substitute the shape drawn with a jlabel (at the same coordinates). I would not want the jlabel to appear until i had pressed the 'start' button....
I hope this is a bit clearer!
Thanks in advance, Charlie

Similar Messages

  • Displaying mutiple pictures onto a front panel

    Hi ,
    Basically what iam trying to do is have mutiple  images on the front panel.
    The problem that iam having is that when i load an image onto the front panel it overwrites the other image. What i mean by that is , that instead of having two images on the front , each time i run the code it loads the same image twice onto the front panel.I tryed using a imaq dispose etc but it didnt work. Iam attaching a file that is similiar to the one that iam working on.
    (incase i didnt explain it very well on my front panel when i run the vi i what to be able to load up two different images onto the front panel like below but try to load a second image it also replaces image 1.)
    image 1
    image 2
    What actually happening
    image 1
    Image2
    Thanks for help. Iam badly stuck.
    (labview 7.1 and vision assisant.)
    Attachments:
    test5.vi ‏116 KB

    Hi jihn,
    you connect on both "IMAQ create" vi´s the same name. I think if you change one name it should work.
    Mike

  • Insert a picture in excell

    Hello,
    is there anyone know how to insert a picture from a front panel indicator into a excel sheet, I tried Addpicture (ActiveX) method, but it needs the filename of the picture, how can I get this filename of this indicator.
    thanks a lot

    Patience... patience...
    What kind of indicator? Is this a graph indicator, or a numeric indicator? I'm not familiar with the AddPicture method, but if it's looking for a filename then you need to save the image to disk. For a graph indicator you can get the graph image using an Invoke node and then use the picture functions to save the image to disk. 
    Attachments:
    save graph_BD.png ‏4 KB

  • Insert  a  Picture Into a Panel....

    How can i insert a picture into a JPanel.
    Actually I want to show the picture only to the left hand side of the
    JFrame.
    Kindly help me.
    Thanx

    I would suggest to use a JLabel instead of JPanel.
    And then go ahead like described in the other tips.
    The JLabel can then be placed whereever you want inside your frame.
    Btw. if you just need something like a dialog - with a label to the left side, few buttons and some objects inside - I recommend to read the tutorials for JOptionPane - it is much easier to use this class instead of doing all the code on your own.

  • How do I add a picture onto a background in iMovie?

    Hi there! So I'm making a YouTube video and I'm trying to make an outro for the video. I want the background to be white and put pictures of the logos of social media website I want in the outro. When I put the white background in the end it's fine and then I try and drag a picture onto the background and the little green plus sign appears and it says... Replace. Replace from Start. Replace from End. Insert. or Cancel. I want the picture to be on the background and I'm just not sure how to do this.

    Have you seen my User Tipp here
    "Movie Magic" with Stills and Dissolve
    When you 'prep' your stills in any 'picture app', you can do a lot of marvel by simply applying dissolves.
    In your case, I would create a white document (in Pixelmator, Keynote, Photshop, online at pixlr.com, whatever ...) and another with your logo (and further more ones with additional logos). Drag the jpgs into your iMovie Project and apply dissolves  - tadahh! - logos appear on white.

  • How do I insert a picture into iMovie regardless of aspect ratio

    When I insert a picture, i either have the choice of cropping the picture or having black bars on the sides. How can I insert a picture into imovie and not be dictated based on the aspect ratio. thanks

    Klaus1 wrote:
    Must be one of the wonderful improvements introduced in iMovie 11.
    nope, never.
    look:
    example #1: a 1:1 pic in a 16:9 screen
    option A bars l/r
    option B cat-off
    example #2: a wiiiide screen pic in a 16:9 screen
    option A bars t/b
    option B catcut off
    and you don't want kitty look like that:
    (1:1 aspect ratio distorted to make fit onto a 16:9 screen)

  • Hi Guys, I have a problem with Importing Pictures onto my Mac mini with Lion installed by using a Card Reader, What is the problem here so I can get Pictures onto my Computer. ,

    Hi Guys,
    I have a problem with Importing Pictures onto my Mac mini with Lion installed by using a Card Reader,
    What is the problem here so I can get Pictures onto my Computer. ,

    Hi Noob Søren
    There are a few things that are confusing in your question.
    As far as I know, you dont have to install Time Machine on this OS as it is already installed for you. You only need to connect a hard drive to your computer via firewire or usb, click on the Time Machine icon, Open Time Machine Preference in the drop down menu and select a disk: your connected hard drive.
    You can of course reformat this connected device, partition it into a few volumes to organise data if you so wish.
    I find it strange that your mac's hard drive is divided into two volumes... perhaps this was created through bootcamp?
    You can access the configuration of your hd through Applications/Utilities/Disk Utilities.
    Clicking on one of the icons on the right hand panel will bring the details of the contents of your hardDrive and volumes. From there you can decide to erase a partition, reformat etc....
    If your hd contains more than one volume, and one of them is empty, you could decide to remove it. Back up all your important data before doing so.
    Hope this helps
    WN

  • How do you insert a picture into an iMovie video?

    how do i insert a picture into an iMovie video?   (i know it's simple and i've done it before, but i can't figure it out now )

    Just drag it onto the Project timeline  From iPhoto or outside of iMovie...
    rick

  • I downloaded pictures onto my iPhone from computer twice by mistake now when i uncheck/sync then check and sync again  i keep getting two lots of pics..how can i get just the one set again? thnx

    I downloaded pictures onto my iPhone from computer twice by mistake now when i uncheck/sync then check and sync again  i keep getting two lots of pics..how can i get just the one set again? thnx

    You're welcome.
    All photos transferred from your computer are stored in the iPhone's Photo Library regardless if you select a single album or folder of photos to be transferred or multiple albums or folders. The photos on the albums or folders of photos include a pointer to the original photos stored in the Photo Library. The photos are not duplicated taking up double the storage space. This way you can view the photos in an album or folder of photos only by selecting the album or folder, or all photos in all albums or folders by selecting Photo Library.
    Makes more sense when transferring multiple albums or folders of photos which cannot be changed when transferring only a single album or folder of photos.
    The same applies with iTunes and music playlists. A song can't be in a playlist unless it is in the main iTunes library. Placing a song in a playlist does not duplicate the song.

  • How can I get my old pictures onto my android?

    I was wondering how I can get my old pictures onto my android from my Verizon account?

    Which phone do you have?
    Easiest way is to change the storage location to the removable SD card then put that in your other phone (provided it has an SD card slot)
    Other options Change storage to SD card then use a computer to transfer to the new phone
    Plug old phone into the computer, load the driver and copy them off the old phone to the computer, then plug new phone in and copy them to the new phone
    Download JS Backup from the Play store onto both phones (provided the new one is an android as well) then on the old phone use the Device to device transfer method to create a backup, and on the new phone use the device to device import to import the pics.
    Whatever you do.... STAY AWAY from Verizon Cloud. Chances are you will never see all of your pictures again and will have tons of trouble getting to them to move or do anything with them.  If you want to use a Cloud Storage, get Dropbox on your old phone and new phone, move the pics into dropbox then onto the new phone.

  • Acrobat form field that allows Reader user to browse and insert a picture into a predefined area

    Is there a way to do insert a form field into an AcroForm that allow Reader users to browse and insert a picture into that form field?
    I know that LiveCycle can do this, but I need to do this using an AcroForm. Or maybe there's a third-party plug-in that can be used in an AcroForm to do this?

    Jay,
    The new version of Reader, which was announced today (see AcrobatUsers.com), will now allow you to use the field.buttonImportIcon method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.737.html
    For a bit more information, see: http://forums.adobe.com/thread/743823
    Here's the minimum code that can be used in the Mouse Up event of a button that's configured with a layout that's something other than "Label only":
    // Mouse Up script for a button
    event.target.buttonImportIcon();
    Since this isn't backwards compatible with Reader, you'll probably want to add additional code to test what version is being used and alert the user if it's pre-11. You should also check the return value to see if anything went wrong. The hard part is getting everyone to upgrade, but this and a number of other features should make it worth it.

  • Inserting HTML/CSS in a Tabbed Panel

    I've been having trouble inserting HTML/CSS into a Tabbed Panel widget. In this case, the HTML/CSS is creating a text box with scroll bars (as described in an excellent workaround for getting scroll bars to work).
    Has anyone else come across this situation?
    Thanks!

    I'm not seeing the same problem (the scrolling text box displays fine in the tabbed panel for me).
    Does your HTML container fit within the content area of the panel?
    Here are screenshots from Muse Design view:
    and Preview in Browser (Firefox):
    When you say it's not working, what exactly do you mean? What's happening?
    Best regards,
    Corey
    Edited: Adding topic on creating scrolling text box for reference: http://forums.adobe.com/message/4327943#4327943)

  • How can I insert a picture into a AbsoluteLayout ?

    Hi everybody.
    I am using a null layout and I don't know how to insert a picture.
    public static void addComponentsToPane(Container pane) {
            pane.setLayout(null);
           JButton b1 = new JButton("one");
           /* ... the rest of the elements...*/
          pane.add(b1);
         Insets insets = pane.getInsets();
         Dimension size;
         size = b1.getPreferredSize();
            b1.setBounds(250 + insets.left, 40 + insets.top,
                         size.width , size.height);
       /* and the rest of the program with createandshowgui and main */Can I do with a picture the same thing that I did with this button (setBounds etc?)
    If yes, how can I do that?

    blackblack13 wrote:
    Thanks for the answer but why you say no to use null layout?what is the disadvantage?The disadvantages are having an app that is completely inflexible and does not adapt well to different operating systems and desktops. Please read the Sun tutorial on using layout managers.
    And I tried using a JLabel and then make a new ImageIcon(the target of the picture) but I have an error when I add it to the pane with pane.add(picture); where the picture is the JFrame of the photo and pane is the name of the container.because you're doing this all wrong. You shouldn't add a JFrame to a container. Have you looked at the JLabel tutorial in the Sun tutorials as was suggested above?
    Can you write me the exact commands that I should use?No, but we all can guide you to do what you want to do, but first we need to know exactly what this is. So, what exactly are you trying to do here? Details are very important.
    Thank you very much.You're welcome.
    edit: the tutorials can be found here:
    [Really Big Index|http://java.sun.com/docs/books/tutorial/reallybigindex.html]
    [How To Use Labels|http://java.sun.com/docs/books/tutorial/uiswing/components/label.html]
    [Laying Out Components Within A Container|http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html]
    Edited by: Encephalopathic on Jul 11, 2009 11:47 AM

  • How or can I insert a picture to an exsisting photo album in between other pictures?

    How or can I insert a picture to an exsisting photo album in between other pictures?

    The easiest is to use 3rd party apps like Photo Manager Pro; you can drag pictures to any position.
    Before
    http://i1224.photobucket.com/albums/ee374/Diavonex/5cd4653fb07b9aa0ef10642dc01c3 26a.jpg
    After
    http://i1224.photobucket.com/albums/ee374/Diavonex/c276e25c9f93f43081b79db6d309d c6d.jpg

  • Is it possible to insert a picture in a form?

    The person filling out the form would insert a picture in a space provided.... all of which could then be distributed.... Or if I can't do this in a PDF form, how else can it be done? What I'd really like to have (but is probably not doable) is a thumbnail of the picture on the form where it expands upon clicking on it. Can anyone point me in the right direction. Obviously I'm new to this and just trying to help a friend out in his new business. Thanks!

    An html widget (created with adobe edge or other means) would take up the whole screen when the user taps on the widget. Probably not the localaized effect you're looking for. Another way could be to use a keynote presentation with an animation that starts when the user taps on it. None of these solutions are ideal. If your book has a lot of these types of effect, you're better off developing an app or using another tool than IBA.

Maybe you are looking for

  • My iPad wont let me connect you my iTunes account or do the new upgrade, Help!

    I need help please. My iPad wont let me do any apple updates for apps etc. I can't download music etc. used to be able to but doesn't seem to connect to I tunes. Everything else works

  • Embedded BI - Reporting Functionalities and Performances

    Hi, there are Reporting functionalities that are available only for Embedded BI/external BI or they are the same? IMPORTANT: there are differencies in Reporting on ERP Tables with Virtual Infocube use if BI is embedded/not embedded?  There are differ

  • First PKGBUILD, is it alright to submit?

    I wrote a python Youtube search client with a curses interface. I wrote a PKGBUILD for it aswell so I can easily share it with my archie friends. However, this is the first PKGBUILD I wrote, so I ask you to please review it for me and let me know if

  • If I update my Apple iPhone software, will it delete my music and videos?

    I need to update my software on my iPhone to iOS 5.1.1, but I am worried that it will delete all of my TV shows. Is that the case? Thanks.

  • Can't find class

    Hi, A have made an annotation processing test class using netbeans 6 and jsr 269 @SupportedAnnotationTypes("*") @SupportedSourceVersion(RELEASE_6) public class CustoWizardAnnotationsTest extends AbstractProcessor { @Override public boolean process(Se