Setting the background image in a JFrame

Hi all,
I have a .gif that I want to display as the background image in a JFrame. How do I do that?
regards,
Mat

Check out this thread:
http://forum.java.sun.com/thread.jsp?forum=31&thread=288769

Similar Messages

  • Why is there a scroll bar though I set the background image to "scale to page size"?"

    Why is there a scroll bar though I set the background image to "scale to page size"?"

    The current build of iTunes may occasionally draw the scroll bar off the edge of the screen. It should be possible to resize the window to reveal the scroll bar.
    You can restore much of the look & feel of the previous version with these shortcuts:
    Ctrl-B to turn on the menu bar.
    Ctrl-S to turn on the sidebar.
    Ctrl-/ to turn on the status bar.
    Click the magnifying glass top right and untick Search Entire Library to restore the previous search behaviour.
    You can also open the menu bar temporarily by pressing Alt.
    tt2

  • Setting the Background Graphics for a JFrame

    Hi,
    I am designing a GUI-based game and intend to set the background of my JFrame to a specific jgp graphic...I can't seem to find any method for setting the background in the JFrame API.
    Kindly assist!
    Cheers.

    Your search is perhaps marred by being too specific to frame. It is generally considered a bad idea to do any 'custom' thing directly to a frame. Try this search instead.
    [http://www.google.com/search?q=background+panel+java]

  • Can we set the Background Image for a Report

    Hi,
    I am generating a report thru the web now i want to give the background image to the report, let me know if any body knows about this.
    Thanx

    hello,
    try the before reports value of your report-level properties. add the BACKGROUND attribute to the BODY tag to reference an image-file for the background.
    regards,
    the oracle reports team

  • How I can set the background image in Muse for the menu I have in PSD

    I have design a layout and I want to get them converted from PS to muse. Can someone know how I can make this.
    I am trying to set the menu's top and bottom image in muse.
    Let me know how I can do it better.
    Thanks
    kristina

    Hi Kristina,
    You need to cut up the image you pasted above and also create an on/off state for all menu items. Actually, there are 4 states: Normal, Rollover, Mouse Over and Mouse Down, but you'll usually use two images as some states share the same image. Then you need to use the menu widget and supply your cut up images for all states in that widget. Check this link http://www.adobekb.com/building_your_first_website_pt4.html at around this section:
    Cheers,
    Mario

  • Does ne1 now the html code to set a background image=non repeat, center for dreamweaver or where to find it?

    Im trying to set up an about me page like that of myspace.com
    i know that in myspace you can set the background image center non
    repeat can this be done as will with dreamweaver?

    Hello,
    Yes, it can be done using CSS.
    You can place this in your code, right before </head>.
    Just substitute your image for mypicture.jpg.
    <style type="text/css">
    <!--
    body {
    background-image: url(mypicture.jpg);
    background-repeat: no-repeat;
    background-position: center center;
    -->
    </style>
    -OR-
    You can also do this using DW's dialog boxes (like a wizard).
    If you have DW8 or CS3...or MX2004 if memory serves, you can
    right click on
    your page in design view.
    Select CSS Styles > New
    A CSS Rule dialog box opens.
    Select tag, then in the tag box, type body.
    You can select whether you want to add the CSS to this page
    (like the code
    above) or to a stylesheet linked to this page. If you are
    going to use CSS
    on multiple pages, it's a good idea to use a stylesheet. Then
    you can make
    changes in one place that affects all the pages linked to
    that stylesheet.
    When you click OK, a new box will open where you can define
    your CSS.
    Select "background" from the sidebar, and the fill in areas
    are pretty self
    explanatory.
    I hope that helps.
    Take care,
    Tim
    "Jimtheman2000" <[email protected]> wrote in
    message
    news:fo84t1$je9$[email protected]..
    > Im trying to set up an about me page like that of
    myspace.com i know that
    > in myspace you can set the background image center non
    repeat can this be
    > done as will with dreamweaver?

  • Set body background image in reflow

    Hi, I've been lookoing up and down to find where I can set a background image for a page in reflow. Cant find it anywhere. If I manually edit the html or css in the files edge generates to add a background image, of course it works, but next time I reopen the project in reflow, my changes get deleted, and I am back where I was before.
    So, where in reflow can I set the background image?
    thanks and best regards,
    c

    Something like this? Background Pictures Edge Reflow

  • How can I put a vertical menu ON TOP OF the background image?

    I've taken a screenshot to describe my problem.
    http://i48.tinypic.com/10ndeg4.jpg
    I want to put the menu on top of the background image. Compare it to placing another image on top of the background image. HOW on earth can I do this?

    Did you try putting the image in a <div> and setting the background image for the <div> with CSS.  Then within the <div> place your menu.
    Just a thought.
    LJD

  • How to set a background image to fill the entire screen on any device in a spark mobile application

    Hi,
    I started developing a mobile application with Flex.
    I'm trying to set a background image to fill the whole screen. I've been stucked at this point for days now. I tried everything and no solution seems to work for me.
    I'm using a TabbedViewNavigatorApplication and i need to set some background images on views.
    I need my image to fill the entire screen on any device. i don't need to mantain image aspect ratio,  just need it to be fullscreen. This seemed to work when setting a custom skin on the TabbedViewNavigatorApplication, however this blocked all my views for some reason and all components contained in view became invisible.
    Can you please tell me how can i achieve this?
    Kind regards,
    Dan

    Basically you need a larger image which can accommodate any device. The trick is to show only what each device can display, so therefore some clipping will occur based on device. Have something centered and towards margins have a  gradient or just plane colors that way the stuff in the middle will be visible on every device while nobody will care if you are clipping from the color fill.
    C

  • Can I invoke a SubVI in an event? and how do I set the background color of a pipe to #0000ff?

    When I click an image or a glass pipe(which belongs to Industry/Chesmitry category in palette), I want a SubVI to be invoked.
    The purpose is to fetch an OPC-UA data from a web service and to write to it via the service.
    We are building an HMI solution which displays an interactive water plant diagram.
    When users click pipes and motors in the diagram, clicked devices should be turned on and off and change their animations or colors accordingly.
    OPC-UA is for communication with devices.
    I couldn't even set the background color of a pipe to "#0000ff", but setting it to "Red" or "Blue" was possible, and I don't know how to invoke SubVIs in event scripts.
    The documentations in NI.com are confusing and lack depth.
    Even silverlight references are confusing.
    How do I do all of these?

    Hi iCat,
    Can you provide some more information about your current implementation so that we can help to answer your questions. Some questions I have for you are:
    Are you creating this project in the NI LabVIEW Web UI Builder or in LabVIEW?
    How are you publishing your webservice? Is this also in LabVIEW?
    How is your webservice interacting with an OPC-UA server?
    How is the certification set up with OPC-UA so that you can communicate between the server and the client?
    Best Regards,
    Allison M.
    Applications Engineer
    National Instruments
    ni.com/support

  • How to set a background image in Web dynpro for Java?

    Hi,
    Experts,
    As i  want to set a background image in my application can u please suggest how to get background image. send any sample scenarios.
    Thanks in advance,
    Shabeer ahmed

    Hi,
    I don't  think it can be done in WDJ.
    Maybe something can be done on the portal end.
    Refer to http://help.sap.com/saphelp_nw70/helpdata/en/79/affe402a5ff223e10000000a155106/frameset.htm
    Changing the theme can help maybe but I do not know how to go about that
    Regards,
    Himanshu

  • How can I get the background image of my website to cycle on a timer?

    I'm afraid my experience with Javascript (Which I'm certain this will require) is fairly limited and I'm still quite new to Dreamweaver, so I'm posing this question to you guys.
    I'd like the background image of my website to change every five minutes or so, however I'm unsure of how to accomplish this. For those of you with Windows 7, you can set the background of your desktop to cycle through a folder of images every ten minutes or so. I'd like something similar for this website.
    Thanks in advance.

    Supersized can do this for you with very less need for code.
    http://www.buildinternet.com/project/supersized/ - Take a look at their demo. It's also a lightweight plug-in and it has a lot of great effects you could use. Also x-browser friendly.

  • Help me change the background image

    I just installed my copy of iWeb. The first thing I did after selecting a template was try to change the background.
    I hit the inspector button, found the tab with the background stuff, selected image fill, fit to size, and chose my photo. And nothing happened.
    Then I hit the media button, selected photos, dragging a photo to the background image in the inspector and nothing happened.
    What is the secret to changing the background image?
    Thanks.

    I tried to delete everything but the background image that comes with the template and iWeb still refuses to change to anything I want to change it to.
    Any ideas? The application doesn't seem to be working for me.
    Also if I save a file, where on the local HDD does it get saved? When I hit save iWeb didn't allow me to set a file name, it apparently just saved the document somewhere in a place that I cannot find.
    I want to be able to do some quick down and dirty web pages and then bring them into Dreamweaver at a later date and FTP them to the web.

  • Setting a background image using CSS Designer

    I am trying to set a background image for a page header using the CSS Designer. When I click the browse button the Select Image Source dialog box launches but any time I click on something the dialog box closes and no changes are made. Does anyone know what is causing this?

    Which DW are you using and which platform/OS, please? I am unable to reproduce this with CC2014 on OS10.9.4

  • How can i  set the .PNG image on JButton

    hi deras
    i try my best to set the png image on button instead of gif or JPEG.
    plz help me as soon as possible.
    thanking u i remain.

    Try harder.import javax.swing.*;
    import java.io.IOException;
    import java.net.URL;
    public class TestPNGButton {
         public static void main(String[] args) {
              try {
                   final JFrame frame = new JFrame(TestTextArea.class.getName());
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   JButton button = new JButton(new ImageIcon(
                             new URL("http://java.sun.com/docs/books/tutorial/ui" +
                                       "swing/components/example-1dot4/images/pngIcon.png")));
                   frame.setContentPane(button);
                   SwingUtilities.invokeLater(new Runnable() {
                        public void run() {
                             frame.pack();
                             frame.show();
              } catch (IOException e) {
                   e.printStackTrace();
    }It works for me.

Maybe you are looking for

  • Empathy fails to connect to google talk using gnome online accounts

    Hi there, After last upgrade to gnome 3.6 empathy fails to connect to google talk using GOA credentials. Of course I can configure a talk account directly in empathy but... I would prefer to use a single sign on (with gnome online accounts). Does any

  • Form 9i problem

    Hi all, I just installed 9ids on my Win XP. I played around with it but it seems that I must have set something wrong. I just created a simple form using the Scott's schema and try to run it. However, the URL always display the following: http://%%20

  • Nokia 5800 XpressMusic Text Error

    Hi ,  for example  when i write a message i choose hand writing , when i write in the box nothing appears in the box ( i mean it appears in the message but it doesnt appear in the box) ,,,   and another problem , when i change the keyboard it has min

  • [web gallery] how to define the export color profile

    Hello, I'm currently working on a web gallery template wich will create both web size and full size images. It will allows my clients to directly download the images they want for their article, and save me a lot of time for the uploading process. Th

  • New Camera Raw Update adds support for more cameras.

    http://support.apple.com/kb/DL1072 This update extends RAW image format compatibility to Aperture 3 and iPhoto '09 for the following cameras: Canon PowerShot SX1 IS Olympus E-PL1 Panasonic Lumix DMC-G2 Panasonic Lumix DMC-G10 Samsung NX10 Sony Alpha