Drawing a picture within JFrame when I've already created a JFrame

Hi everyone,
I was wondering if you could help me out with this problem I'm getting. I'm creating a program to simulate an 'elevator.' When first creating the project I created a brand new 'Java GUI Form' : 'JFrame Form'. From here I went on to drag-and-drop various command buttons and labels to create the user interface (the 'inside' of an elevator). Here is where my question comes in. On the very left of my interface I want to have the program draw a simulation of a box (the elevator) moving up and down with the 'floor numbers' the user pushes. However i don't know how to access the coding of the jFrame object that I created through the design editor so i can input the coding.
First Question: What do i have to 'write' that would force that box to print into the current JFrame?
Second Question: What Code (and where do i put it) essentially 'locks' the JFrame from being resized?

Here, maybe by putting this it might help you recognize what i'm trying to say. The code i'm trying to put in is:
JFrame window = new JFrame ("Drawing");
        window.setBounds(200,200,700,500);
        window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        window.setVisible(true);
        Container contentPane = window.getContentPane();
        contentPane.setBackground(new Color(125, 125, 125));
        Graphics g = contentPane.getGraphics();* This is a portion of the code
When run, this program creates a NEW JFRAME WINDOWS, i'm trying to make it run inside an already existing JFrame, whose variable Name i dont know how to find.

Similar Messages

  • My sister inlaw gave me her iphone3 and when i try to update a app it says that i must sign into her accound when i have already created my own apple id n put it in, how can i avoid that from happening/ change it?

    my sister inlaw gave me her iphone3 and when i try to update a app it says that i must sign into her accound when i have already created my own apple id n put it in, how can i avoid that from happening/ change it?

    You should do this to make this your iPhone and remove her info...
    If desired, move photos/videos off the Camera Roll: http://support.apple.com/kb/HT4083
    If desired, backup the device to iTunes or iCloud: http://support.apple.com/kb/ht1766
    Then, on the device...
    Settings > Messages > iMessage > Off
    Settings > FaceTime > Off
    Settings > iCloud > (scroll down) Delete Accout (this only unregisters and deletes it off the device)
    Settings > iTunes & App stores.  Tap the AppleID and sign out.
    Settings > General > Reset > Erase All Content and Settings
    Unregister the device at https://supportprofile.apple.com
    More Info... http://support.apple.com/kb/HT5661

  • ALE Change sales order when Delivey order already created and posted

    Dear All,
    We  know that
    ALE with message type of ORDERCHG can change the sales orde automatically when the purchase order have changes.
    And I can still change affect the sales order by change the purchase order even the following delivery has been created and posted.
    Have someone has the familiar experience, and is there any
    solutions to block this function?
    (I mean once the delivery order has been created, the changes on purchase order should not effect the sales order)
    Thank you very much!
    Best regards,
    Sophia

    Dear All,
    Anyone have the similar experience ?
    Is there any clues?
    Thanks
    Best regards,
    Sophia

  • I am trying to scan document that I will then attach in an email.  When I attach it it shows up as a picture within the email instead of an attachment an people can't open it.  Any help here?

    I am trying to scan document that I will then attach in an email.  When I attach it it shows up as a picture within the email instead of an attachment an people can't open it.  Any help here?

    What kind of Mac are you using, and what version of the operating system?
    You should be able to select the document that you want to attach and then use the contextual menu (right click in some worlds) to compress the document, producing a .zip file. You can then attach that to the email and it won't appear as a picture within the email.
    If I recall this correctly, the "compress" part in the contextual menu may have a different terminology.

  • In imovie, I have greenscreen clip.  First I want to change background to solid color THEN add a picture within picture.  When I try to stack all 3, I get two but not all three.....help!  thanks!

    in imovie 10.0.2, i have a green screen clip.  first i want to change background - solid color probably - but then i'd like to also add a picture within picture along side the video....have attempted to "stack" all three, and can get two out of three but not all three....what's the trick?  thanks!

    In iMovie you can only do two at a time. So the work-around would be to do the green screen/change background color part. Then Share this. Then import this piece back into an event. Then add the picture in picture.
    In Final Cut Pro X, you could easily do what you are describing.
    The main reason is that iMovie does all rendering in one pass. Final Cut Pro X allows multiple renders as you go along, so you can do much more complex effects.

  • Does any one know what the matrix.dms is? And why it is in my picture folder? When I open this file the unarchiver takes over and I see my entire hard drive when I scroll down I see the matrix.dms file with in the unarchiver.

    Hello everyone. Does anyone know that the matrix.dms file is? And why it may have came to be in my picture folder? When I opened the file the unarchiver took over, then I saw my files in the unarchiver window. I then scrolled down and I saw the same matrix.dms file within the unarchiver window. I made a video of what saw when I tried to open the file, so as to aide in your understanding of reason for my perplexion at this file. Thank you for your help. https://www.youtube.com/watch?v=2QeWH9hRnro&feature=youtu.be

    Hi EMT-B,
    It sounds like you have done all the troubleshooting needed to narrow down your issue with the iPhone camera to hardware. Based on the information you have provided, it appears your iPhone needs to be serviced. The following link should help you get started with the process and has links with additional information on topics such as warranty and service pricing, battery replacement, and express replacement service.
    Apple - Support - Service Answer Center
    http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipho ne
    You may need to change the country when you get to the page.
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • HT4236 Hello, does anyone have any advice on how to sort photos in an albumn on an Iphone by date of photo? I've ordered them all in my Pictures but then when I sync them across through Itunes, they all end up in a jumble on my phone. Thanks!

    Hello, does anyone have any advice on how to sort photos in an albumn on an Iphone by date of photo? I've ordered them all in my Pictures but then when I sync them across through Itunes, they all end up in a jumble on my phone. Thanks!

    When viewing an album on the iPhone you can tap "Photos" at the bottom and that will show all photos by date. Unfortunately though it is all photos, not just the album you are currently viewing.
    What I have done is the following. On the computer I have a main folder (e.g. iPhone photos) and then make sub-folders within that. Placing photos that will be synched to the iPhone into various subfolders gives quite a bit of organizational capablility. In iTunes when you select the main folder to sync, the sub-folders will show on the iPhone as separate albums. Beyond that, in one case where I really wanted a specific sort within an album I renamed the photos on the computer (something like A-picxxx, B-picxxx) so they sorted on the computer alphabetically in the order I want on the phone. That sort order was maintained after the sync.
    Note that each time you sync using iTunes, the non-Camera Roll pictures on the phone will be set to match the current iTunes settings/photos -- so you can experiment.

  • Firefox is no longer showing pictures within icons

    Hi,
    My Firefox has stopped showing pictures within icons.
    If you can imagine an webpage that is used to send and receive email. This webpage has the "Reply" button. My reply button used to have a left arrow picture within the button however now there is nothing but a faint grey box. There is nothing that denotes this box as a button (reply or otherwise) . If I hover over the box the word "reply" will appear.
    All websites are like this...no "rich" web experience...just a white page ans faint grey boxes.
    I am operating Windows 7 Home edition.
    I uninstalled FF and reinstalled it and still no luck.

    Hi Cor-el,
    Thank you for your kind attempt at fixing this problem.
    I performed both of the fixed suggested above and still no pictures within the buttons. I closed FF and restarted and no joy.
    Can you PLEASE keep scratching your brain and think up something eles?
    As described...when looking at my email web page there used to be in the "reply" button a left pointing arrow and the "forward" button had a right facing arrow. Now there is nothing but a very faint box around where the button is (almost cannot see it). It is the same with other web pages as well.
    If I hover over the button the "Reply" cloud-ey thing pops up.
    Without the pictures in the icons it makes the email page almost useless.

  • How do I move pictures within Albums?

    I have an IPAD Air with iOS8.1 installed.  Why, when I added pictures did some of them get out of order?  How do I move pictures within Albums?

    To rearrange photos in an album:
    Open the album.
    Touch "Select"
    Touch and hold on a photo and drag it to the desired location.

  • I'm using imovie 10.0.3 with OS x Version 10.9.2.  or some reason I can't double click on iphoto events to siadplay the pictures within that event. I've rebuilt my iphoto library, but nothing seems to work.  Any help would be appreciated.

    I'm using imovie 10.0.3 with OS x Version 10.9.2.  or some reason I can't double click on iphoto events to siadplay the pictures within that event. I've rebuilt my iphoto library, but nothing seems to work.  Any help would be appreciated.

    Hello All,
    Also no answer but am having the same problem.  All my catalogueing via folders is up in smoke and no external HDs (where I would normally directly store raw footage when importing) showing up on the iMovie interface.  It is a pain the arse to go back to the earlier version - why APPLE, pray tell, do you continue to lower expectations user-friendly functions. Shall try the option+open for a library but this too is extremely inconvenient if it works like iPhoto because you have to log out to log in to a new library whereas I just want to be able to see my multiple HDs directly from the iMovie menu and then the folders within folders I have layered in there - to make it easy to FIND STUFF. Wake up Apple, you are NOT meeting your customer's needs or desires.
    Thanks to the posters who are helping the rest of us lost in the dark with possible solutions - free fix-its for Apple which they don't deserve.

  • How to draw the picture in labview 8.6 and how to simulate the same

    Hi
    Iam using Labview8.6 and we need to draw the picture or import the autocad drawing and we need to simulate the same.
    If anybody knows please reply me.

    Hi MikeS81,
    In detail,I have one overall layout of my project in a cad format consisting of Shell,Boom etc.. Simulation means when I give a run command to Shell motor,my Shell in the picture also should be rotate.i.e.,user has to understand what is going on in the field.
    Regards
    vbk123

  • Draw a picture on a component

    hi,
    does anyone know how i can draw a picture on a JPanel or a component that is inside a frame?
    thanks

    Read this section from the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/14painting/index.html]Custom Painting.
    Here is a simple example:
    import java.awt.*;
    import javax.swing.*;
    public class FaceComponent
        public static void main(String args[])
            JPanel swing = new JPanel()
                public void paintComponent(Graphics g)
                     super.paintComponent(g);
                    g.drawArc( 100, 45, 80, 80, 0, 360);
                    g.setColor( Color.blue );
                    g.drawArc( 120, 70, 10, 10, 0, 360);
                    g.setColor( Color.blue );
                    g.drawArc( 150, 70, 10, 10, 0, 360);
                    g.setColor( Color.magenta );
                    g.drawLine ( 140, 85, 140, 100 );
                    g.setColor( Color.red );
                    g.drawArc ( 110, 55, 60, 60, 0, -180 );
            swing.setPreferredSize( new Dimension(200, 200) );
            JFrame frame = new JFrame();
            frame.getContentPane().add( swing );
            frame.pack();
            frame.setVisible( true );
    }

  • How can I rearrange the order of pictures within a folder

    I have an 8310 and all of the pictures are stored on a media card.  The pictures are all within one folder.  I want to rearrange the order of the pictures within the folder.  When looking at the pictures they are in rows of 3.  I want to move picture #9 to position #1 within the same folder. I've read all the help topics and have not been able to accomplish this.
    Any help would be appreciated.

    Go to your photoshop.com website. Log in if needed. Click on "Online Tools."  Choose "Photoshop Express Organizer."  Click and drag photos into the order you want.
    Captions might best be added in the Elements Editor Organizer (99jon is correct) by double-clicking on thumbnail to make a full screen image, then a line appears under the photo and asks you to print your caption there. Sync it with your online website.
    Bill

  • Photoshop CC: When I'm trying to draw a rectangle I can't fill it or create a stoke because there is a message telling me; "Could not complete your request because of a program error. What can I do?

    Photoshop CC: When I'm trying to draw a rectangle I can't fill it or create a stoke because there is a message telling me; "Could not complete your request because of a program error. What can I do?

    It is a mute point now. PSE12 finally failed to the point it locked up the MAC. I had to restore the MAC OS from backup to a point before the PSE12 update.
    The MAC now operates correctly and so does PSE12. I don't think I'll be updating PSE any time soon.

  • Can i make a book in iPhoto without using any of the built in layout templates, which are too limiting when i have already cropped my pictures to show just what I want. Ideally I just want to drag and drop and arrange and size the pictures myself

    Can i make a book in iPhoto without using any of the built in layout templates, which are too limiting when i have already cropped my pictures to show just what I want. Ideally I just want to drag and drop and arrange and size the pictures myself

    If you have Pages you can create customs pages for your book as TD suggested. If you have Pages from iWork 09 or 11 this app will add 80 or so additional frames to those offered:  Frames and Strokes Installer. Don't use it on the latest Pages version, however.
    This tutorial shows how to create a custom page with the theme's background: iP11 - Creating a Custom Page, with the Theme's Background for an iPhoto Book.  Once the page is complete to get it into iPhoto as a jpeg file follow these steps:
    Here's how to get any file into iPhoto as a jpeg file:
    1 - open the file in any application that will open it.
    2 - type Command+P to start the print process.
    3  - click on the PDF button and select "Save PDF to iPhoto".
    NOTE:  If you don't have any of those options go to Toad's Cellar and download these two files:
    Save PDF to iPhoto 200 DPI.workflow.zip
    Save PDF to iPhoto 300 DPI.workflow.zip
    Unzip the files and place in the HD/Library/PDF Services folder and reboot.
    4 - select either of the files above (300 dip is used for photos to be included in a book that will be ordered).
    5 - in the window that comes up enter an album name or select an existing album and hit the Continue button.
    That will create a 200 or 300 dpi jpeg file of the item being printed and import it into iPhoto. For books to be printed choose 300 dpi.

Maybe you are looking for