How do I add a background picture til my swing CUI

How do I add a background picture til my CUI. I�m using Swing - not using any JPanel.
Here my code:
class Start extends JFrame implements ActionListener
     JButton soeg, tilfoj, afslut;
     JTextField beskedText;
     JLabel besked;
     private Image baggrund;
     public Start()
          setTitle("Video Registrerings System");
          setSize(300,250);
          setVisible(true);
          addWindowListener(new WindowAdapter()               // Opretter vinues "lytter"
               public void windowClosing(WindowEvent e)
                    System.exit(0);
          Container c;
          c = getContentPane();
          c.setLayout(null);
          try
               URL imagename = new URL("file:/c:/jdk1.3.1_02/java/vrs_background.jpg");
               baggrund = createImage((ImageProducer) imagename.getContent());
          catch (Exception e) {}
          // Tilf�jer knapperne
          tilfoj = new JButton("Tilf�j ny video");
          tilfoj.setBounds(75,110,150,25);
          tilfoj.setVisible(true);
          tilfoj.addActionListener(this);
          c.add(tilfoj);
          soeg = new JButton("Video s�gning");
          soeg.setBounds(75,145,150,25);
          soeg.setVisible(true);
          soeg.addActionListener(this);
          c.add(soeg);
          afslut = new JButton("Afslut");
          afslut.setBounds(75,180,150,25);
          afslut.setVisible(true);
          afslut.addActionListener(this);
          c.add(afslut);
          //Tilf�jer tekstfelt og label
          besked = new JLabel("Besked:");
          besked.setBounds(10,45,50,25);
          besked.setVisible(true);
          c.add(besked);
          beskedText = new JTextField(" V�lg en af de nedenst�ende knapper");
          beskedText.setBounds(65,45,215,25);
          beskedText.setVisible(true);
          c.add(beskedText);
     }

Here is a link that might help you:
http://forum.java.sun.com/thread.jsp?forum=57&thread=219443

Similar Messages

  • How do I add a background color to a document in Pages?

    How do I add a background color to a document in Pages?  I have made an invitation, with a photo in it, the text is in color, and I want to make the background pink instead of white.  thanks

    whoops sorry figured it out thanks!

  • How do I add mpg background video behind a psd menu in Encore?

    How do I add mpg background video behind a psd menu in Encore? The psd file is transparent and it still comes out as pitch black behind the menu. I'm inexperienced with these products so any help is greatly appreciated.

    If you have done what Russ describes and it does not work...
    Encore replaces the background layer with your motion video. So make sure you have a) a layer at the bottom (in Photoshop layer order) that is named "background," and b) no other full layer above that (for example, an image in another layer you've used instead of the original background layer).
    Also keep in mind that setting transparency in Photoshop is overridden by various Encore processes.

  • How to I add a background image in an Encore slidehsow?

    How do I add a background image in an Encore slidehsow? Currently the slideshow has a black background and I would love to be able to change that to an image.

    You can always fire up Premiere (or Photoshop) and create images with whatever background you choose.........

  • How do I add "change background/foreground color" to the configurator, and color buttons?

    How do I add "change background color" and "change foreground color" in the configurator?
    Also is there a way to color buttons?
    Regards,
    Glen

    No matter whether you mean the application Configurator or a Panel created with Configurator you would probably do well to post the question on the Configurator Forum.
    Configurator

  • HT1040 How do I add multiple different pictures to my order?

    How do I add multiple pictures to my order? It wants me to check out after each one!

    With the amount of information you've provided it's impossible to offer a potential solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?
    what system version are you running?
    can you post a screenshot of the order window?
    OT

  • How do I add multiple background music clips to iMovie

    Trying to add multiple background music to iPhoto clips to make a vacation iMovie but when I add a music clip, it shoots right to beginning rather than stopping at the end of last clip added. I've pinned my background music to the first clips but want to add more background music but can't make it stop at the right photo clip. How do I place new background music at the right clip?

    I don't use iPhoto (but read your post since it mentioned iMovie which I do use) - anyway, you're not talking about the application iMovie - you're talking about a movie.
    So I am guessing, but it may work the same as it would with iMovie:
    Can you select the audo clip and  simply drag it to the spot you want it to start? Or, mocw the playhead to the spot where you want it to start then import it?
    FYI, it would be helpful to indicate which Mac OS version  you are running - it is not iOS 6 which is for iDevices.

  • How can I add new background on iweb?

    Dear all,
    somebody knows how can I add new backgroungs on iweb? and also how can I add my own themes?
    Cheers

    bobzhuman wrote:
    You can add new backgrounds in the "page"..."layout" section of the "inspector"...no limit to what you can add. Remember to use low resolution pics (72 dpi vs 300 dpi) and think of the size necessary for a "wallpaper" on your desktop. ex. http://www.desertmoon.net/Coryhamilton/Home.html done with a Jumsoft theme (baseball dark) as a core.
    The file used as a background on that site is located at http://www.desertmoon.net/Coryhamilton/Home_files/grunge.jpg
    It's dimensions are 1200px by 797px and 284k in file size. I guess there might be a reason to have the width set for 1200px even though file sizes could benefit from a smaller dimension repeating graphic, but running the file through Photoshop or even Elements would let the owner "Save For Web" as a .jpg - medium quality and get the file size down to about 108k so that the page would load quite a bit faster.

  • How do you add captions to pictures

    Some of my pictures have caption and some do not.  How do I add missing captions?

    The photo has a caption that shows on Photo Element.
    The document does not allow me to add one.  How do I do that?  Also where do I learn to enhance this photo.
    Look everyone I am 81 yrs. old and need some advice.  I am just writing a Historical Biography on two of these women; my Cherokee grandmother and my great grandmother.  I know I can do this.  It is just a high learning curve.  Thanks

  • How do you add people's pictures with contact info?

    How do I add photos of my friends with their contact info?

    See this...
    http://docs.info.apple.com/article.html?artnum=302493
    I would imagine that they just have to be in the program you are syncing from. If you are on Windows XP, the pics would have to be in Microsoft Outlook.
    You would add it here in outlook...
    If you are adding contacts manually (by dragging the vCard files to the iPod) then you cannot have pictures displayed.
    btabz

  • How do you add a colored picture on top of a black and white picture with out it turning black and white too?

    I am making grad invites and i keep trying to add a colored picture on top of the black and white background picture and it keeps changing the colored one black and white i am using Photoshop CC 2014! any help is greatly appreciated! I cant figure this one out!

    What is the file type? Is it a file that supports layers?  Is the color photo in its own layer?
    Please post a screenshot of the layers panel.

  • How do I set a background picture for my homepage, not just the edges but the entire screen?

    When I use other web browsers I have the ability to set a background picture on my homepage. How do I do that on Firefox?

    Is this picture to be used in a drop zone or used as the total background of a theme?  If the former it's not possible to do that as that's the nature of the drop zone .
    For a general background for the menu the image should have a 4:3 size ratio in the landscape orientatikon.  For a portrait oriented photo that would mean either cropping to a 4:3 landscape ratio or creating  a 4:3 landscape canvas and putting the portrait image in the center, edgo or wherever and using the composite image.  There will be some white space but that can be filled with a color that goes with the image.
    Of course you will need to use 3rd party image editor that an handle layers or Pages.
    Some Image Editors That Support layers:
    Photoshop Elements 11 for Mac - $79
    Rainbow Painter - $30
    Imagerie - $38
    Acorn - $50
    Pixelmator - $60 
    Seashore - Free
    GIMP for Mac - Free
    Xee 2.1 - free
    You will get something like this:
    One could move the image to the right or left edge for better esthetics and have the buttons in the "white" area.
    OT

  • How do you add your contact picture to a text message?

    I want to be able to see my contact pictures whenever I text someone from my contacts list. How do you put your contact pictures on a text message for iPhone 6? I can see my contacts pictures when I send/receive a group text but not an individual text. Is this feature equip for apple phones? Thank you!!!

    bmm243 wrote:
    Is this feature equip for apple phones?
    No.

  • How do I change the background picture that is shown when i start my Mac?

    On the iMacs in my school they have a different name for everyone of the after for example the band Queen and then there is a picture on the inlogg screen with queen on it. So then you log in and there is another background picture after that. I Have a macbook pro and I would like to change that "start-picture".
    Right now it´s kind of boring and grey. Can you change it somehow?

    It sounds like you're using Adobe Send for Outlook.  Correct?
    Unfortunately, there is no way to change the default text that is inserted into your message. You'll have to change it each time.
    I will pass along your request to the Adobe Send team.

  • How can i add Image or Picture Column to Matrix

    Hello Experts,
    I want to add Image or Picture column on my Add-on form matrix
    I am working on 8.81 PL5
    Please help out.
    Regards,
    Bhavank

    Hi Bhavank,
    Try This.....
          ocolumn = ocolumns.Add("CoGS", SAPbouiCOM.BoFormItemTypes.it_PICTURE)
            ocolumn.Editable = True
            ocolumn.Width = 60
            oitem.FromPane = 9
            oitem.ToPane = 9
            ocolumn.TitleObject.Caption = "COGSProfitCenter"
            ocolumn.DataBind.SetBound(True, "", "Folder")
            ouserdatasource = oOrderform.DataSources.UserDataSources.Item("Folder")
            omatrix.AddRow()
            omatrix.GetLineData(1)
            ouserdatasource.ValueEx = "c:\41224_128614427186464_128584050522835_146624_537710_s.jpg"
            omatrix.SetLineData(1)
    Thanks
    Shafi

Maybe you are looking for

  • Officejet Pro 7780 - Unable to print or scan

    I have HP Officejet Pro 7780 printer that can be connect to Netgear  router by cable or wireless and by wireles to HP Pavillion laptop running Windows 7. I use to be able to print and scan using HP Solution Centre or use MS Windows drivers,however af

  • Manipulate client side files?

    Hi, I would like to manipulate client side files using APEX. Is there any functionality available for APEX similar to the functions provided in Oracle Forms 10g WebUtil? such as: CLIENT_HOST and CLIENT_TEXT_IO is there a way of using these functions

  • File "rpdeluxe.properties" in Home Folder

    Hi, I have just noticed a file called "rpdeluxe.properties" in my home folder. When I open it I see the following info: #Thu Sep 27 21:28:48 CEST 2007 SerialNumber=RPRID-0400-58818-00783-71277 LocaleCountry=US LocaleLanguage=en Can anyone tell me wha

  • Oracle 8i/9i for Solaris Intel

    Where can I download Oracle 8i or Oracle 9i for Solaris X86 (Intel) ?

  • Can't Create a Bootable DVD of TechTool Deluxe

    I am trying to create a bootable dvd of TechTool Deluxe (from AppleCare) and it just isn't working. I have followed the instructions to the letter, but when I try to boot from the disk (either by holding down C or changing the startup disk before res