Background image for JPanel

I was to come here and "search" for examples on this but i havnt found any so im jsut going to post it:
How do i set an image to be the background of a JPanel? setBackground(image); doesnt work... i was toal something about paintComponent() but i tried it with that too and it didnt work... anyhelp would be greatly appreciated

Ive tried many of the things that search suggested but none of them pertained enough to what i am doing for it to work. Here is my code:package gameFunctions;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class loginScreen extends JFrame implements ActionListener
     JTextField USERNAME, Username, PASSWORD, Password; // yeah i know, bad practice but there is some logic to the names relative to capitalization
     String username, password;
     JButton LOGIN;
     Dimension res = Toolkit.getDefaultToolkit().getScreenSize();
     ImageIcon background = new ImageIcon("C:\\FileTesting\\testImage.jpg");;
     JPanel pane;
public static void main(String[] args)
          loginScreen frame = new loginScreen();
          frame.setVisible(true);
public loginScreen()
          Container c = getContentPane();
          setSize(400, 300);
          setLocation((int)res.getWidth()/2-getWidth()/2, (int)res.getHeight()/2-getHeight()/2);
          setResizable(false);
          setLayout(null);
          pane = new JPanel();
          pane.setSize(getWidth(), getHeight());
          pane.setLayout(null);
          c.add(pane);
          USERNAME = new JTextField("Username:");
          USERNAME.setSize(68,25);
          USERNAME.setLocation(getWidth()/2-USERNAME.getWidth()/2-80, getHeight()/2-USERNAME.getHeight()/2-50);
          USERNAME.setEditable(false);
          pane.add(USERNAME);
          PASSWORD = new JTextField("Password:");
          PASSWORD.setSize(68,25);
          PASSWORD.setLocation(USERNAME.getX(), USERNAME.getY()+30);
          PASSWORD.setEditable(false);
          pane.add(PASSWORD);
          Username = new JTextField();
          Username.setSize(150,25);
          Username.setLocation(USERNAME.getX()+USERNAME.getWidth()+5, USERNAME.getY());
          Username.setEditable(true);
          pane.add(Username);
          Password = new JTextField();
          Password.setSize(150,25);
          Password.setLocation(Username.getX(), Username.getY()+30);
          Password.setEditable(false); // because im not working with PW's yet
          pane.add(Password);
          LOGIN = new JButton("LOGIN");
          LOGIN.setSize(80,30);
          LOGIN.setLocation(getWidth()/2-LOGIN.getWidth()/2, PASSWORD.getY()+30);
          pane.add(LOGIN);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
public void actionPerformed(ActionEvent event)
}i want "pane" to be the image of "background" imageIcon is the only thing that works like this because i dont know how to use straight up "Image". everything works if i set the ImageIcon "background" to be the background of JButton "LOGIN"
any help would be greatly appreciated

Similar Messages

  • Background image  for JPanel using UI Properties

    Is there any way to add background image for JPanel using UI Properties,
    code is
    if (property.equals("img")) {
    System.out.println("call image file in css"+comp);
    //set the background color for Jpanel
    comp.setBackground(Color.decode("#db7093"));
    here the comp is JPanel and we are setting the background color,
    Is there any way to put the Background image for the JPanel ????

    KrishnaveniB wrote:
    Is there any way to put the Background image for the JPanel ????Override the paintComponent(...) method of JPanel.
    e.g.
    import javax.swing.*;
    import java.awt.*;
    import java.io.*;
    import javax.imageio.ImageIO;
    public class ImagePanel {
        public void createAndShowUI() {
            try {
                JFrame frame = new JFrame("Background Image Demo");
                final Image image = ImageIO.read(new File("/home/oje/Desktop/icons/yannix.gif"));
                JPanel panel = new JPanel() {
                    protected void paintComponent(Graphics g) {
                        g.drawImage(image, 0, 0, null);
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.setSize(new Dimension(400, 400));
                frame.setContentPane(panel);
                frame.setLocationRelativeTo(null);
                frame.setVisible(true);
            } catch (IOException ex) {
                ex.printStackTrace();
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    new ImagePanel().createAndShowUI();
    }

  • Trouble with background image in JPanel

    I'm trying to get an image to display as a background image, and then put JLabels with other content on top of that background image. I've tried several things but can't figure out how to do it. Everytime I try, I get the images to display but the content is displayed side by side because of the layout manager.
    I've tried this but the image is displayed very tiny and still is not displayed in the background.
       //*   Draw background images for panels            *
           public class BackgroundPanel extends JPanel
          // the image you want displayed in the background
             private Image background;
          // A constructor to build and initialise your panel.
          // @param resourceName
              public BackgroundPanel(String resourceName)
                background = new ImageIcon( getClass().getClassLoader().getResource( resourceName )).getImage();
                setOpaque(false);
          // @see java.awt.Container#paint(java.awt.Graphics)
              public void paint(Graphics g)
                g.drawImage(background, 0, 0, 200, 480, this);          
             // draw the rest of the panel and it's children
                  super.paint(g);
          }

    To add a background to a Swing component, do not overload the public void paint(Graphics g); methods, but the public void paintComponent(Graphics g); instead, otherwise, the background will always overlap the Swing components added.
    Here is a goog working code:
    public void paintComponent(Graphics g) {
         super.paintComponent(g);
         g.drawImage(myStaticBackground, this.getWidth() - 256, this.getHeight() - 256, this);
    }In this example, I draw a static Image sized 256�256 at the bottom right corner.
    Fabruccio
    Java J2SE 1.5

  • How can I use a JPEG file as a background image for my vi in 8.5

    Im working on a vi that I plan on using as part of an alarm system.  I would like to use a JPEG file of my house as a background image for the vi, or possibly to just be displayed in a window on the control panel.  I have seen people use their own images before, but never looked at what this involved.
    Im trying to use the "read JPEG file" vi and the "draw flattened pixmap" vi to accomplish this.  The vi does run, but nothing shows on the front panel.  If I try to create an indicator from the "new picture" output of the "draw flattened pixmap" vi, I get an empty white window on the front panel.
    Any advice?
    Thanks
    Solved!
    Go to Solution.

    Guruthilak wrote:
    the earlier vi (using the JPEG) works fine. just increase the size of the picture control
    I figured this was the problem. And to the OP, I'm glad a bitmap worked, but no I didn't mean use any sort of LabVIEW programming at all. I meant open your image in Microsoft Paint, Press ctrl+A to select the whole thing. Then copy the image to the clipboard. Now select your front panel and press ctrl + v to paste it. No programming needed and the image is there. However, if you want to programmatically change it, you will need a picture control.
    CLA, LabVIEW Versions 2010-2013

  • How to create a background image for each item in a List object

    Hello.
    I am trying to create a background image that displays whenever a user posts something to a list.  For example when a user posts text it would appear in a list.  The new item in the list would contain a specific background image with the users text appearing on top of the background image.  I do not want a background image for the entire list, rather each item within the list.
    I am not sure how clear this is so I added an image below.  When a user enters text in and clicks the "post-it" button their text would appear below with the sticky note background. 
    I am not sure which list type would be best for this problem or how to create insert the image, so I am open to suggestions. 
    Thank you for your help.  Any advice or guidance will be greatly appreciated!

    Hi
    the easiest way would be with itemRenderer.
    You have to do two things:
    1. In your list declaration use a item renderer: <mx:List itemRenderer="myRenderer"/>
    2. create a flex component myRenderer that will be the single item. This can be a canvas with a background image and a text field on it.
    When you add a new item to the list, a new myRenderer item will be created and the data property will be passed to it. So you have to put "data" in your textField.
    If you need more help try looking at Tour de Flex samples, they're pretty easy.
    Andrei

  • Background image for a Scene in JavaFX2.0

    Hi all,
    I am new to JavaFX2.0 and need to know how to set a background image for a scene.
    Thanks in advance.

    Hi,
    here is simple example:
    bgtest.css
    .root {
        -fx-background-image: url("mybg.jpg");
    }BackgroundImage.java
    package playground;
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Stage;
    public class BackgroundImage extends Application {
        StackPane root;
        Scene scene;
        Button button;
        public static void main(String[] args) {
            launch(BackgroundImage.class, args);
        @Override
        public void start(Stage stage) throws Exception {
            stage.setTitle("Custom Background Test");
            button = new Button("test");
            root = new StackPane();
            root.getStyleClass().add("root");
            root.getChildren().addAll(button);
            scene = new Scene(root, 600, 600);
            scene.getStylesheets().add(BackgroundImage.class.getResource("bgtest.css").toExternalForm());
            stage.setScene(scene);
            stage.centerOnScreen();
            stage.setVisible(true);
    }

  • Background Image for a Page

    Hi All,
    How to have a background image for a Portalpage? As Portlets are on the top of page,setting image in the Portal Style does not help.
    What's the wworkaround?
    Thanx

    I know,I can set the background image in the Page Template but in that case Portlets do not take that image as a background.Then It looks very awkward.
    How to solve this? Anybody at Oracle.
    Thanx

  • How to add different background image for submenu items???

    Hi all,
    I'm pretty new to web design and CSS in particular. Here's my problem...
    I've got a Spry horizontal menu bar (untouched as yet), and I want to have a different background image for my submenu items than that of my menu items. From searching the internet I think that I need to apply a class to the submenu item (please correct me if I am wrong).
    How would I go about doing this and how would I assign the class to just the submenu items?
    Also ideally I want to have my first and last menu items to have rounded corners on one side (therefore making a rounded edge menu bar), is it possible to have a different background image for individual menu items? If so, how?
    Really appreciate any help!

    Thanks for the link! I've managed to sort the background issue, and it seems to be working fine!
    Just one little issue left to tackle...
    I want my text to be centered in my top menu items BUT aligned left in my drop down menu items. I have managed this but the text hugs the left hand side. I've tried adding a little margin to the left but that doesn't seem to affect anything???
    Here's my CSS... Any ideas which class I should be targeting or why adding the margin isn't working would save my tearing the rest of my hair out! thanks! (screenshot attached).
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - Revision: Spry Preview Release 1.4 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
        margin: 0;
        padding: 0;
        list-style-type: none;
        cursor: default;
        width: auto;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
        z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        margin: 0;
        list-style-type: none;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: 120px;
        float: left;
        height: 24px;
        padding-top: 0;
        padding-right: 0;
        padding-bottom: 0;
        padding-left: 0;
        background-repeat: repeat-x;
        background-color: #333333;
        background-image: url(../images/navbar_bg.jpg);
        border-right-width: 1px;
        border-left-width: 1px;
        border-right-style: solid;
        border-left-style: solid;
        border-right-color: #000000;
        border-left-color: #666666;
    ul.MenuBarHorizontal li li
        list-style-type: none;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: auto;
        float: left;
        height: 24px;
        background-color: #333333;
        background-image: none;
        padding: 0;
        margin: 0;
        left: -1px;
    ul.MenuBarHorizontal li li a
        list-style-type: none;
        position: relative;
        text-align: left;
        cursor: pointer;
        float: left;
        height: 24px;
        background-image: none;
        font-size: 12px;
        font-weight: normal;
        border: 0px 0 0;
        width: 120px;
        font-family: Geneva, Arial, Helvetica, sans-serif;
        padding: 0;
        margin: 0;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
        margin: 0;
        list-style-type: none;
        font-size: 100%;
        z-index: 1020;
        cursor: default;
        width: 120px;
        position: absolute;
        left: -1000em;
        height: 24px;
        padding-top: 0;
        padding-right: 0;
        padding-bottom: 0;
        padding-left: 0;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
        left: auto;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
        position: absolute;
        height: 24px;
        width: 120px;
        margin-top: -5%;
        margin-right: 0;
        margin-bottom: 0;
        margin-left: 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
        left: auto;
        top: 0;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal li a
        display: block;
        cursor: pointer;
        text-decoration: none;
        font-style: normal;
        text-transform: capitalize;
        text-align: center;
        white-space: normal;
        padding: 0px;
        height: 24px;
        font-family: Geneva, Arial, Helvetica, sans-serif;
        font-size: 12px;
        font-weight: bold;
        color: #FFFFFF;
        line-height: 20px;
        margin: 0px;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal li a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
        background-color: #000000;
        background-image: url(../images/navbar_bg_hover.jpg);
        background-repeat: repeat-x;
        line-height: 22px;
    ul.MenuBarHorizontal li li a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
        background-color: #000000;
        background-image: none;
        background-repeat: repeat-x;
        width: 120px;
        font-family: Geneva, Arial, Helvetica, sans-serif;
        font-size: 12px;
        font-weight: bold;
        color: #FFFFFF;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
        background-repeat: repeat-x;
        background-position: 95% 50%;
        background-color: #333333;
        background-image: url(../images/navbar_bg.jpg);
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
        background-repeat: repeat-x;
        background-position: 95% 50%;
        background-color: #000000;
        background-image: url(../images/navbar_bg_hover.jpg);
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarHorizontal li.MenuBarItemIE
        display: inline;
        f\loat: left;

  • Setting background image for repeating frame in .pdf report

    Is it possible to set a background image for a repeating frame, and more specifically for a repeating frame rendered in .pdf?
    I do not see any standard property in the navigator for images of any sort and the documentation touches only on setting background images for graphs, which is not the intent in my case. I -did- add an HTML table property background="myimage.jpg" but the report is ultimately generated in .pdf format and I was not surprised to see that the image was not rendered.
    Does anyone know if setting a background image as described is even possible, and if so, how? A second but less optimum solution would be setting the image as the background for all report pages, again in .pdf.
    Many thanks.

    Hi Raj,
    Yes you can have an image in the background. Thats possible if you are using XML forms as an iview or ivew dev in WebDynpro...
    Also check this [link|regarding background color change in iview]
    Regards,
    Piyush
    Reward points if this helps!!!

  • How to change background image for each individual page in a template?

    I've been working for hours to try to figure out how to change the background image for each individual page in a template.  I have tried making a div in the body and adding a CSS and setting a background picture.  Unfortunately even after I made it editable all templated webpages changed.  I tried looking at different forum results which didn't really help me out. http://forums.adobe.com/message/2670005#2670005#2670005.  I've also tried embeding a CSS style on the webpage instead of the external CSS which again didn't work.  I'm not sure where to go from here.  Is there a good video that explains this clearly.  Please help.  Thanks.

    Adjust inline styles to suit your needs.
    <li><a tabindex="-1" href="giving/index.html" class="MenuBarItemSubmenu" style="background:none; color:#FFF; background: #000;">GIVING</a>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Background image for ApplicationControlBar

    Hello,
    Forgive my english and its accent, this is a bit urgent.
    I need to set a background image for an
    applicationContolBar... with css and with css only(an external css
    file)
    I tried a few ways but no use... is this possible?
    Please help...
    sharat87

    "sharat87" <[email protected]> wrote in
    message
    news:gdphmq$aee$[email protected]..
    > Hello,
    > Forgive my english and its accent, this is a bit urgent.
    > I need to set a background image for an
    applicationContolBar... with css
    > and
    > with css only(an external css file)
    > I tried a few ways but no use... is this possible?
    Can the CSS file have embed statements?

  • Background-image for commandToolbarButton

    Hi,
    I want to skin af:commandToolbarButton similar to standard skinned commandbutton.
    I managed to change the background-image for the link-section, but there seems to be a other section with a background-image which is a little bit bigger than the link-section.
    But I can't find how to e.g. disable this background-image when mouse is moved over the commandtoolbarbutton.
    Here my CSS definition for the hover-action:
    ================================
    af|commandToolbarButton:hover,
    af|commandToolbarButton::link:hover,
    af|commandToolbarButton::text:hover
    background-image: none;
    border : none;
    ============================
    What's my mistake?
    regards
    Peter

    Hi,
    if you extend an existing skin then you need to use
    -tr-inhibit: background-image
    Here's a list of the valid CSS
    af|commandToolbarButton      
    Style on the root element of the af:commandToolbarButton component. This style includes the .AFDefaultFont:alias style. CommandToolbarButton supports further styling with the :hover, :depressed, :selected, :disabled, :text-only and :action-disabled pseudo-classes.
    af|commandToolbarButton::access-key      
    Style on the access key for the label of the af:commandToolbarButton component. For example, underline the access key. Includes .AFFormAccessKeyStyle:alias.
    af|commandToolbarButton::link      
    Style on the button link on the af:commandToolbarButton component.
    af|commandToolbarButton::text      Style on the button text on the af:commandToolbarButton component.
    af|commandToolbarButton::dropdown-cell      
    Style on the cell containing the dropdown icon used for the popup button of the af:commandToolbarButton component.
    af|commandToolbarButton::dropdown-icon-style      
    Style of the icon used for the popup button of the af:commandToolbarButton component. The icon is specified as a background-image in this key. To override the default icon, set -tr-inhibit: background-image in the dropdown-icon-style and define the override icon for the dropdown-icon.
    Frank

  • Background image for charts

    Hi,
    Is it possible to add a background image for a chart. If so, can anybody please explain?
    Thanks in advance.
    Fred

    > Is there a way to apply an image to the background of a graph/chart? I would
    > like to overlay a plot on an image, which would make the vi more friendly
    > for users.
    >
    You can place images pretty much anywhere on the panel or on a control.
    Probably the easiest approach is to place the image behind the graph and
    color the graph parts transparent. You will need to color both the
    graph frame, the gray box, and the plot area, typically its black. If
    both of these are transparent, the graph will draw
    slower than before, but it should look correct.
    To integrate the image a bit more with the graph, you can use the
    control editor to place the picture behind the black plot area, but in
    front of the frame, then color just the plot area transparent. This
    means that the
    image and control will stick together better. Its also
    possible to import the image into some area of the graph, and this will
    even allow for scaling, but this will work best if imported into the
    frame as the graph cheats with the plot area and doesn't really draw
    that image each time.
    Greg McKaskle

  • Adding A Separate Background Image For Each Menu Item

    I asked this in the Spry forum, and not sure I understand the answer. Plus, I should have been more specific in asking how to do it, as I'm still pretty new to this stuff. Nothing I'd found indicated it could be done, or how.
    Org question -
    I know you can apply a background image to the menu bar items, but is it possible to add a background image for each individual item? What I'm basically trying to keep are the effects (bevel/emboss, etc.,) that I attached to the text, when I created it in PS CS4.
    Answer -
    Yes you can. The widget is just normal plain html markup so you can just add other classNames or id attributes to the elements. And style the elements through those classes/ids.
    Does this mean I'd have to write a new rule for each menu item? What?
    Thank you.

    Did an Adobe Tutorial for creating/entering a Spry Menu Bar. This is the HTML, after I took out the submenus.
    <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="news.html">Features</a></li>
          <li><a href="news.html">News</a></li>
          <li><a href="news.html">Fashion</a></li>
          <li><a href="news.html">Lifestyle</a></li>
          <li><a href="news.html">Calendar</a></li>
        </ul>
    This is from the SpryMenuBarHorizontal.css (It seems like I need to make changes in the Design Info section of this code. But nothing I've tried has worked):
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    cursor: default;
    width: auto;
    text-transform: uppercase;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
    z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    position: relative;
    text-align: left;
    cursor: pointer;
    width: 7em;
    float: left;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    z-index: 1020;
    cursor: default;
    width: 8.2em;
    position: absolute;
    left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
    left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
    width: 8.2em;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
    position: absolute;
    margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
    left: auto;
    top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
    border: 1px solid #CCC;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
    display: block;
    cursor: pointer;
    background-color: #EEE;
    color: #333;
    text-decoration: none;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
    background-color: #33C;
    color: #FFF;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
    background-color: #33C;
    color: #FFF;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
    background-image: url(SpryMenuBarDown.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
    background-image: url(SpryMenuBarRight.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
    background-image: url(SpryMenuBarDownHover.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
    background-image: url(SpryMenuBarRightHover.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
    position: absolute;
    z-index: 1010;
    filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
    ul.MenuBarHorizontal li.MenuBarItemIE
    display: inline;
    f\loat: left;
    background: #FFF;

  • How to use background image for a page that work in Netscape..???

    Hi there
    Is there anyway around to use background image for a portal page that works well with netscape.
    As I have used that but in coming in Netscape.
    thanks
    Rakesh

    1) You post questions in the wrong forum. (As you title says this is a Swing question).
    2) Not once in your last 10 postings have you ever bothered to reply to a posting to thank people for the help you have received.
    I seriously doubt you well ever get answers in the future.

Maybe you are looking for