Help with images in Spry menus

I need help making this work: I want my menu buttons and
submenu buttons to be images rather than text. I've been able to
set it up to use different images for each of the main and
sub-level buttons, but only for the active state. I cannot figure
out how to use a different set of "hover images" for the hover
state. Note-- Each button and submenu button in the entire menu are
different images, so I suspect I need to use different ID's for
each, but I am not sure how to set that up in the
SpryMenuBarHorizontal.css file for each different button in, at
least, the active and hover states. Can anyone offer some help with
this?:

V1 - Thank you for the suggestion, but this does not exactly
solve my dilemma. In its simplest terms, this is what I want to do:
Create a single drop-down menu where there is "Item 1" with
submenus "Item 1.1", "Item 1.2", and "Item 1.3". But, I want to use
different images for each item and subitem in their Active and
Hover states. So, in this example, there would be 8 different
images... An Active and a Hover image for each of Item 1, Item 1.1,
Item 1.2 and Item 1.3.

Similar Messages

  • Help with Dreamweaver CS5 spry menus. Submenus are not showing.

    Hello.
    I am working on a new website, and added 2 vertical spry menus to the page (left hand side under SEARCH). All of my submenus were working properly except for the fact that I couldn't see the entire list once it dropped down past the container window. I tried adding "overflow: visible" to the ul.MenuBarVertical ul AND ul.MenuBarVertical ul li and all of my submenus disappeared. Both spry menus were saved with different names. I tried UNDO multiple times, but they are still not working. HELP! I really don't want to have to go back and re-create these 2 menus.
    Thank you.
    Heres the link to my website
    http://www.advertools.net/pmgdemo/index.html
    P.S. I am Mac based and have only viewed my site on Safari, so I'm not sure how this looks on IE or any other browsers.

    I looked at your linked site from a PC on Chrome 12, Firefox 4 and IE9. Your menus show albeit that they sometimes overlap a little in an unpleasant (but workable) way. I have not checked with Safari, need to get an updated copy.
    So the problem does not show up in the browser.
    Is the problem with Contribute?
    PS: You submenus show out horizontally, not vertically - is that what you intended?

  • Help with Dreamweaver CS5 spry menus. Menu is not dropping down in IE7.

    Hello.
    We recently upgraded from GoLive CS3 to Dreamweaver CS5. Wow! This has been a big change for us. We are having trouble with a website that we are building, specifically the Spry Menu drop downs not appearing correctly in IE7 and older. While the dropdown menu appears in other browsers, it is not dropping down at all in IE7 and earlier versions. After researching this topic on many websites, including this forum, we are still unable to resolve our particular issue. We have tried many of the suggestions that are common to our problem, but have not found a solution as yet. Could someone please check out this page for us, and possibly give us some advise. We are working on Mac OSX. Thank you in advance for any suggestions you may offer.
    http://www.advertools.net/pgtdemo/index.html

    When I added the following to the document
    <style>
    #main_image {position:static;}
    </style>
    the menu items appeared albeit in the wrong position.
    The reason for the hidden menu items is because #main_image had a position of relative, effectively creating a flow of its own rather than following the natural flow of the document.
    Now for the postion of the submenu. If I add the following style rules to the document the submenu items are in the correct position
    ul.MenuBarHorizontal li {text-align: left;}
    ul.MenuBarHorizontal a {text-align: center;}
    In the first line I have reset the rule that you had changed to center align and in the second line (which is not in the original CSS) I have aligned the text in the anchor tag to align center.
    The reason is that IE<8 behaves differently to other browsers when it comes to list items causing the nested list items (submenu) to align themselves to the center of the text of the parent list item.
    I hope the above helps.
    Gramps

  • Help with further customisation spry menus

    Hi,
    I'm designing my first ever website using dreamweaver. I've successfully got a horizontal spry menu along the top of my pages which links them all together and I have all the normal and rollover colours I want etc. However, I would like the tabbed structure to show which page you're actually on by either displaying it in a different colour or it having a border or something, is this possible?
    How would I go about doing this?
    Thanks

    As an amateur who's been mostly using design view could you give me a bit more detail on exactly how to do it please?
    If you don't understand that tutorial, I'm afraid you won't understand anything else I tell you.  If you want to do advanced things in DW, you need a working knowledge of HTML and CSS code.
    Start here:
    HTML & CSS Tutorials - http://w3schools.com/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Help with image ready on ps3 extended

    I am pretty new to photo shop and have cs3 extended.
    I have a Yorkie website where I cut out my Yorkies and paste them to differnet backgrounds.... a lady that does the ANIMATED pictures  HAS DID A COUPLE FOR ME ....BUT I NEED TO LEARN TO DO THIS MYSELF.  She will not tell folks how to do:)
    The problem is once you work with a pic that is animated already then try to  add a dog.....by pasting....it removes the animation in the background pic.... and the picture no longer moves once the dog is added ?....She said she puts thru IMAGE READY...which I do not see anywhere on CS3 extended.  I will try to insert a pic she did for me and any help would be greatly appreciated....as I can do but then the picture is no longer animated once altered in my photoshop but she is doing somehow.....so has to be poss ?  If I were to do this pic it would stop moving once the dogs were added....plus not as good as her but practicing........could it be the fact she is doing in layers and I am doing copy and paste...I do know she puts thru Image ready and I do not know where this is located on cs3 extended or how to do?
    am

    well...........l when I try to open Gif with the import and chose the video frames to layers...am getting a message saying I need Quicktime 7.1 to be able to do??? and when selecting import that is the only option I have to open my animated picture?...YOU HAVE BEEN SO MUCH HELP!   THANK YOU SO MUCH...! 
       BLUE MONDAY EXCLUSIVES   
    Date: Sat, 17 Apr 2010 20:23:27 -0600
    From: [email protected]
    To: [email protected]
    Subject: Re: Help with image ready on ps3 extended
    I'm not sure anyone mentioned this but if not to open GIFs using the import you have to enter the GIF name as GIF isn't listed as one of the options.
    It sounds like you are viewing the images in a maximized screen mode. To view more than one document, press F to cycle through the screen modes. FYI, only the contents of the currently selected document can be viewed in the layers palette.
    I'll just talk about copy/paste so as not to confuse...
    If you are going to copy/paste, click the frame around the dog document to target it. Your layers palette will now contain the contents of the dog document. Click on the layer in the layers palette with the selected dog over transparency. With that layer highlighted in your layers palette, press Ctrl A; then Ctrl C. (Select<Select All; Edit<copy if you prefer using the menu.) This will copy that layer into your clipboard.
    Next, click the frame of the document containing the animation. Click the topmost layer in the layers palette because we want you dog to be in the top layer. Press Ctrl + V. (Edit<Paste if you prefer using the menu).
    Your dog is most likely going to be too big. Use Edit<Free Transform to size and move the dog to the desired location.
    At this point, your dog should be showing in each frame in the animation palette.
    Example:
    http://forums.adobe.com/servlet/JiveServlet/downloadImage/25315/with-palettes-open.jpg
    I'm using the older Image Ready me method. The highlighted place in the palette is where you switch methods between the old method and the new timeline. Notice, I have the layers and animation palette both in the workspace...and I'm not in a maximized mode. The red arrow shows the correlation between the frame and the layer represented by it in the layers palette.
    Image:second-image.jpg
    Here I have a second image to slip into my animation. I have the creature selected and on it's own layer with transparency around it. Notice that the the layer with the isolated creature is highlighted. At this stage, I'll press Ctrl + A; then Ctrl + C to select and save this image to my clipboard.
    Image:creature-added.jpg
    Here, I've pasted (Ctrl + V or Edit<Paste) in my creature and resized it (Ctrl + T or Edit<free transform) so he can be jumped. I also added a shadow under my creature which I added to a layer under my creature. Notice that when Frame on is selected in the animation palette that the eye is on both the creature and the shadow. If I click the eye to turn them (creature and shadow layer) off, they disappear from the entire animation. I can make them appear at any frame by clicking the desired frame in the animation then turning on the eye icon for the creature and shadow layer in the layers palette. I can also adjust opacity if desired.
    You could even more than the one image if you want the dog to appear to move. Use the eyeball visibility to determine which pose will be used for that frame.
    Example:
    Image:jump-creature-gif.gif
    Here, I used transform warp to adjust the pose of the creature for a few frames as he's jumping the creature...just for fun.
    >

  • Using images in Spry menus

    Can someone please point me to instructions on how to incorporate button images in horizontal Spry menus?

    Here's the working model for the menu I created using images for the main menu tabs: http://mmfc.org/HomePage_CleanUp/index_working.html. And here is the style sheet: http://mmfc.org/HomePage_CleanUp/SpryAssets/working.css.
    I have one remaining problem, and hope someone can help.
    There are three states/images for the main menu tabs: normal state, hover state (when the cursor is over the tab), and visible state (when a submenu is open and the cursor is over a submenu item).
    In OS10.6.4/Safari, it works correctly:
    Normal state
    Hover state
    Visible state
    In Windows XP/IE 6, the 3rd state works incorrectly -- the hover state doesn't get replaced by the visible state:
    In OS10.6.4/Opera and OS10.6.4/Firefox, it also works incorrectly -- but this time the hover state gets replaced by the hover color, not the visible state image:
    For reference, I've copied the CSS below.
    @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;
    font-size: 100%;
    cursor: default;
    float: right;
    /* 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: auto;
    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: auto;
    position: absolute;
    left: -1000em;
    background-color: #FDE9BB;
    /* 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 variable width according to submenu item text */
    ul.MenuBarHorizontal ul li {
    width: auto;
    /* 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
    /* No borders on all sides */
    /* ul.MenuBarHorizontal ul
    border: 1px solid #666666;
    /* Menu items are a light colored block with no padding and no text decoration */
    ul.MenuBarHorizontal a {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    white-space: nowrap;
    text-decoration: none;
    display: block;
    cursor: pointer;
    color: #000000;
    padding-right: 0px;
    padding-left: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
    font-size: 11px;
    /* For setting the background color of the spry menu you need to edit the background in the CSS pane. Click on the spry menu bar and then open up the CSS pane. Window > CSS Styles. There's a few CSS items that set the background by default. The "a" item sets the background for the items that don't have a dropdown and the MenuBarItemSubmenu sets the background for the items that have a dropdown. You can set the background to an image just like you would any other element in your HTML. */
    /* The following selectors define images for the (orange) normal state of tabs */
    ul.MenuBarHorizontal a #AboutUs {
    background-image: url(../img/DropDownMenu_aboutus.gif);
    ul.MenuBarHorizontal a #Missions {
    background-image: url(../img/DropDownMenu_missions.gif);
    ul.MenuBarHorizontal a #Help {
    background-image: url(../img/DropDownMenu_help.gif);
    ul.MenuBarHorizontal a #NewsAndEvents {
    background-image: url(../img/DropDownMenu_newsandevents.gif);
    ul.MenuBarHorizontal a #Media {
    background-image: url(../img/DropDownMenu_media.gif);
    ul.MenuBarHorizontal a #PatientStories {
    background-image: url(../img/DropDownMenu_patientstories.gif);
    ul.MenuBarHorizontal a #ContactUs {
    background-image: url(../img/DropDownMenu_contactus.gif);
    /* The following selectors define images for the (bright) active state of tabs.*/
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover #AboutUs, ul.MenuBarHorizontal a.MenuBarItemHover #AboutUs, ul.MenuBarHorizontal a.MenuBarSubmenuVisible #AboutUs {
    background-image: url(../img/DropDownMenu_aboutus_vis.gif);
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover #Missions, ul.MenuBarHorizontal a.MenuBarItemHover #Missions, ul.MenuBarHorizontal a.MenuBarSubmenuVisible #Missions {
    background-image: url(../img/DropDownMenu_missions_vis.gif);
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover #Help, ul.MenuBarHorizontal a.MenuBarItemHover #Help, ul.MenuBarHorizontal a.MenuBarSubmenuVisible #Help {
    background-image: url(../img/DropDownMenu_help_vis.gif);
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover #NewsAndEvents, ul.MenuBarHorizontal a.MenuBarItemHover #NewsAndEvents, ul.MenuBarHorizontal a.MenuBarSubmenuVisible #NewsAndEvents {
    background-image: url(../img/DropDownMenu_newsandevents_vis.gif);
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover #Media, ul.MenuBarHorizontal a.MenuBarItemHover #Media, ul.MenuBarHorizontal a.MenuBarSubmenuVisible #Media {
    background-image: url(../img/DropDownMenu_media_vis.gif);
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover #PatientStories, ul.MenuBarHorizontal a.MenuBarItemHover #PatientStories, ul.MenuBarHorizontal a.MenuBarSubmenuVisible #PatientStories {
    background-image: url(../img/DropDownMenu_patientstories_vis.gif);
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover #ContactUs, ul.MenuBarHorizontal a.MenuBarItemHover #ContactUs, ul.MenuBarHorizontal a.MenuBarSubmenuVisible #ContactUs {
    background-image: url(../img/DropDownMenu_contactus_vis.gif);
    /* The following selectors define images for the (red) hover state of tabs.*/
    ul.MenuBarHorizontal a:hover #AboutUs, ul.MenuBarHorizontal a:focus #AboutUs {
    background-image: url(../img/DropDownMenu_aboutus_hover.gif);
    ul.MenuBarHorizontal a:hover #Missions, ul.MenuBarHorizontal a:focus #Missions {
    background-image: url(../img/DropDownMenu_missions_hover.gif);
    ul.MenuBarHorizontal a:hover #Help, ul.MenuBarHorizontal a:focus #Help {
    background-image: url(../img/DropDownMenu_help_hover.gif);
    ul.MenuBarHorizontal a:hover #NewsAndEvents, ul.MenuBarHorizontal a:focus #NewsAndEvents {
    background-image: url(../img/DropDownMenu_newsandevents_hover.gif);
    ul.MenuBarHorizontal a:hover #Media, ul.MenuBarHorizontal a:focus #Media {
    background-image: url(../img/DropDownMenu_media_hover.gif);
    ul.MenuBarHorizontal a:hover #PatientStories, ul.MenuBarHorizontal a:focus #PatientStories {
    background-image: url(../img/DropDownMenu_patientstories_hover.gif);
    ul.MenuBarHorizontal a:hover #ContactUs, ul.MenuBarHorizontal a:focus #ContactUs {
    background-image: url(../img/DropDownMenu_contactus_hover.gif);
    /* Menu items that have mouse over or focus have a dark background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus {
    background-color: #bf2e1a;
    color: #FFFFFF;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a dark background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible {
    background-color: #bf2e1a;
    color: #FFFFFF;
    /* Sets width of submenus and makes text non-wrapping  */
    ul.MenuBarHorizontal ul li {
    display: block;
    float: none;
    width: 12em;
    white-space: nowrap;
    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;
    /* 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; */

  • [CS3][JS] Help with image resizing

    I'm still a newbie of ID scripting.
    I'm using js scripting in Indesign CS3 to make an auto-impaginator and I have a problem with images.
    I charged my contents from an xml set of tables, that I put into a fixed textFrame of the master page.
    Because of the table needs to fill multiple pages, I made a function that keep creating pages and link the textFrames so that the table continues in various pages.
    In this whole process I have some images too, that I need to resize them to fill the cell, because now they pass the parent cell.
    I found a method that looks at the bounds and resizes the image and the rectangle too, but it doesn't work always, because if a image is overflowing, it hasn't any bound and it fails, and this causes other problems in my process, so I would find another method.
    So:
    Is there another way to resize an image on-the-way while importing it? Some xml attribute or preference?
    Or some method that works also if the image is overflowing?

    These forums are pointless. Adobe must believe that other users will cut the mustard. Absolutely a waste of effort for everyone. Adobe should PAY at least a junior developer involved in the projects to monitor and help with these posts. FLEX rules yeah and thousands more do scripting than develop plug ins...
    Come on Adobe, step up your better than this. Customer Service can be free to the customers ... we are not talking about GET IT ALL FREE, talking about buy it and create a community and support it, but then again LAYERS and INDESIGN SECRETS have people who actually want to help users rather than rabbit hole everything.
    Please join hands and SING...

  • Urgent Help with Image Gallery

    Hi,
    I really need help with an image gallery i have created. Cannot think of a resolution
    So....I have a dynamic image gallery that pulls the pics into a movie clip and adds them to the container (slider)
    The issue i am having is that when i click on this i am essentially clicking on all the items collectively and i would like to be able to click on each image seperately...
    Please see code below
    var xml:XML;
    var images:Array = new Array();
    var totalImages:Number;
    var nbDisplayed:Number = 1;
    var imagesLoaded:int = 0;
    var slideTo:Number = 0;
    var imageWidth = 150;
    var titles:Array = new Array();
    var container_mc:MovieClip = new MovieClip();
    slider_mc.addChild(container_mc);
    container_mc.mask = slider_mc.mask_mc;
    function loadXML(file:String):void{
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.load(new URLRequest(file));
    xmlLoader.addEventListener(Event.COMPLETE, parseXML);
    function parseXML(e:Event):void{
    xml = new XML(e.target.data);
    totalImages = xml.children().length();
    loadImages();
    function loadImages():void{
    for(var i:int = 0; i<totalImages; i++){
      var loader:Loader = new Loader();
      loader.load(new URLRequest("images/"+String(xml.children()[i].@brand)));
      images.push(loader);
    //      loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onProgress);
         loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
    function onComplete(e:Event):void{
    imagesLoaded++;
    if(imagesLoaded == totalImages){
      createImages();
    function createImages():void{
    for(var i:int = 0; i < images.length; i++){
      var bm:Bitmap = new Bitmap();
      bm = Bitmap(images[i].content);
      bm.smoothing = true;
      bm.x = i*170;
      container_mc.addChild(bm);
          var caption:textfile=new textfile();
          caption.x=i*170; // fix text positions (x,y) here
       caption.y=96;
          caption.tf.text=(xml.children()[i].@brandname)   
          container_mc.addChild(caption);

    yes, sorry i do wish to click on individual images but dont know how to code that
    as i mentioned i have 6 images that load into an array and then into a container and i think that maybe the problem is that i have the listener on the container so when i click on any image it gives the same results.
    what i would like is have code thats says
    if i click on image 1 then do this
    if i click on image 2 then do something different
    etc
    hope that makes sense
    thanks for you help!

  • Help with images.....pliiiizzzzzz

    Im new to java and need help inserting images on a GUI! Does anyone have any programs or snippets of code that've done this successfully - preferrably using the GridBagLayout as well as in swing? If you have anything that works well, feel free to send me the entire java file ([email protected]) or just post it!

    Just create a JLabel with an image icon and you are able to display any JPEG and GIF image. You might take a look at the following:
    http://java.sun.com/docs/books/tutorial/uiswing/components/label.html
    Hope this helps,
    Pierre

  • Help with rollover drop down menus

    I created a flash document with rollover drop down menus, but
    the menus some times won't go back up unless you rollover their
    associated buttons again. Also I created a link inside one of the
    buttons on one of the menus, but when you click that button the
    menu stays down until you rollover the button again. Some times 2
    menus will be down at the same time. Can anyone help me fix these
    problems? I'm a beginner and this is the first flash movie I've
    ever made.

    There is a lot of documentation on the web describing techniques to implement "Cascading Dropdown lists in Excel".
    A few starting points that may be helpful:
    http://chandoo.org/wp/2014/02/13/dynamic-cascading-dropdowns-that-reset/
    https://www.ablebits.com/office-addins-blog/2014/09/30/dependent-cascading-dropdown-lists-excel/

  • Help with image viewer

    Would love some help with this one.. I am new so please bare with me. This app just reads contents of a txt file. What I am trying to add is the ability to display an image inside the program frame with scrolls bars.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class Viewer extends JFrame
       private JMenuBar menuBar;
       private JMenu fileMenu;
       private JMenu fontMenu;
       private JMenuItem newItem;
       private JMenuItem openItem;
       private JMenuItem saveItem;
       private JMenuItem saveAsItem;
       private JMenuItem exitItem;
       private JRadioButtonMenuItem monoItem;
       private JRadioButtonMenuItem serifItem;
       private JRadioButtonMenuItem sansSerifItem;
       private JCheckBoxMenuItem italicItem;
       private JCheckBoxMenuItem boldItem;
       private String filename;
       private JTextArea editorText;
         private JLabel label;
       private final int NUM_LINES = 20;
       private final int NUM_CHARS = 40;
       public Viewer()
          setTitle("Viewer");
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          editorText = new JTextArea(NUM_LINES, NUM_CHARS);
          editorText.setLineWrap(true);
          editorText.setWrapStyleWord(true);
          JScrollPane scrollPane = new JScrollPane(editorText);
          add(scrollPane);
          buildMenuBar();
          pack();
          setVisible(true);
       private void buildMenuBar()
          buildFileMenu();
          buildFontMenu();
          menuBar = new JMenuBar();
          menuBar.add(fileMenu);
          menuBar.add(fontMenu);
          setJMenuBar(menuBar);
       private void buildFileMenu()
          newItem = new JMenuItem("New");
          newItem.setMnemonic(KeyEvent.VK_N);
          newItem.addActionListener(new NewListener());
          openItem = new JMenuItem("Open");
          openItem.setMnemonic(KeyEvent.VK_O);
          openItem.addActionListener(new OpenListener());
          saveItem = new JMenuItem("Save");
          saveItem.setMnemonic(KeyEvent.VK_S);
          saveItem.addActionListener(new SaveListener());
          saveAsItem = new JMenuItem("Save As");
          saveAsItem.setMnemonic(KeyEvent.VK_A);
          saveAsItem.addActionListener(new SaveListener());
          exitItem = new JMenuItem("Exit");
          exitItem.setMnemonic(KeyEvent.VK_X);
          exitItem.addActionListener(new ExitListener());
          fileMenu = new JMenu("File");
          fileMenu.setMnemonic(KeyEvent.VK_F);
          fileMenu.add(newItem);
          fileMenu.add(openItem);
          fileMenu.addSeparator();
          fileMenu.add(saveItem);
          fileMenu.add(saveAsItem);
          fileMenu.addSeparator();
          fileMenu.add(exitItem);
       private void buildFontMenu()
          monoItem = new JRadioButtonMenuItem("Monospaced");
          monoItem.addActionListener(new FontListener());
          serifItem = new JRadioButtonMenuItem("Serif");
          serifItem.addActionListener(new FontListener());
          sansSerifItem =
                  new JRadioButtonMenuItem("SansSerif", true);
          sansSerifItem.addActionListener(new FontListener());
          ButtonGroup group = new ButtonGroup();
          group.add(monoItem);
          group.add(serifItem);
          group.add(sansSerifItem);
          italicItem = new JCheckBoxMenuItem("Italic");
          italicItem.addActionListener(new FontListener());
          boldItem = new JCheckBoxMenuItem("Bold");
          boldItem.addActionListener(new FontListener());
          fontMenu = new JMenu("Font");
          fontMenu.setMnemonic(KeyEvent.VK_T);
          fontMenu.add(monoItem);
          fontMenu.add(serifItem);
          fontMenu.add(sansSerifItem);
          fontMenu.addSeparator();
          fontMenu.add(italicItem);
          fontMenu.add(boldItem);
       private class NewListener implements ActionListener
          public void actionPerformed(ActionEvent e)
             editorText.setText("");
             filename = null;
       private class OpenListener implements ActionListener
          public void actionPerformed(ActionEvent e)
             int chooserStatus;
             JFileChooser chooser = new JFileChooser();
             chooserStatus = chooser.showOpenDialog(null);
             if (chooserStatus == JFileChooser.APPROVE_OPTION)
                File selectedFile = chooser.getSelectedFile();
                filename = selectedFile.getPath();
                if (!openFile(filename))
                   JOptionPane.showMessageDialog(null,
                                    "Error reading " +
                                    filename, "Error",
                                    JOptionPane.ERROR_MESSAGE);
          private boolean openFile(String filename)
             boolean success;
             String inputLine, editorString = "";
             FileReader freader;
             BufferedReader inputFile;
                   label = new JLabel();
                    add(label);
             try
                freader = new FileReader(filename);
                inputFile = new BufferedReader(freader);
                inputLine = inputFile.readLine();
                while (inputLine != null)
                   editorString = editorString +
                                  inputLine + "\n";
                   inputLine = inputFile.readLine();
                editorText.setText(editorString);
                inputFile.close(); 
                success = true;
             catch (IOException e)
                success = false;
             return success;
       private class SaveListener implements ActionListener
          public void actionPerformed(ActionEvent e)
             int chooserStatus;
             if (e.getActionCommand() == "Save As" ||
                 filename == null)
                JFileChooser chooser = new JFileChooser();
                chooserStatus = chooser.showSaveDialog(null);
                if (chooserStatus == JFileChooser.APPROVE_OPTION)
                   File selectedFile =
                                 chooser.getSelectedFile();
                   filename = selectedFile.getPath();
             if (!saveFile(filename))
                JOptionPane.showMessageDialog(null,
                                   "Error saving " +
                                   filename,
                                   "Error",
                                   JOptionPane.ERROR_MESSAGE);
          private boolean saveFile(String filename)
             boolean success;
             String editorString;
             FileWriter fwriter;
             PrintWriter outputFile;
             try
                fwriter = new FileWriter(filename);
                outputFile = new PrintWriter(fwriter);
                editorString = editorText.getText();
                outputFile.print(editorString);
                outputFile.close();
                success = true;
             catch (IOException e)
                 success = false;
             return success;
       private class ExitListener implements ActionListener
          public void actionPerformed(ActionEvent e)
             System.exit(0);
       private class FontListener implements ActionListener
          public void actionPerformed(ActionEvent e)
             Font textFont = editorText.getFont();
             String fontName = textFont.getName();
             int fontSize = textFont.getSize();
             int fontStyle = Font.PLAIN;
             if (monoItem.isSelected())
                fontName = "Monospaced";
             else if (serifItem.isSelected())
                fontName = "Serif";
             else if (sansSerifItem.isSelected())
                fontName = "SansSerif";
             if (italicItem.isSelected())
                fontStyle += Font.ITALIC;
             if (boldItem.isSelected())
                fontStyle += Font.BOLD;
             editorText.setFont(new Font(fontName,
                                    fontStyle, fontSize));
       public static void main(String[] args)
          Viewer ve = new Viewer();
    }I tried using JLabel() but I cant seem to make it work. Whenever i browse and select a .jpg it displays "�������t���o\�[��+�p��B3�+�p��B3�"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    In the future, Swing related questions should be posted in the Swing forum.
    Whenever i browse and select a .jpg it displays "�������t���o\�[��+�p��B3�+�p��B3�" You can read in a jpg file and treat it like a text file.
    Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html]How to Use Icons for the proper way to read images.

  • Help with Images Maps,

    Hi,
    I have an HTML page where an IMG is loaded:
    <img src="images/renders/Main_Image.jpeg" alt="Main Image" name="Main_IMG" width="800" height="600" border="0" usemap="#Main_MAP" id="Main_IMG" />
    Then I have 4 images maps laid on top of the image:
    <map name="Main_MAP" id="Main_MAP">
      <area shape="poly" coords="--some numbers--" href="Area1.html" target="_parent" alt="Area1 Button" />
      <area shape="poly" coords="--some numbers--" href="Area2.html" target="_parent" alt="Area2 Button"  />
      <area shape="poly" coords="--some numbers--" href="Area3.html" target="_parent" alt="Area3 Button" />
      <area shape="poly" coords="--some numbers" href="Area4.html" target="_parent" alt="Area4 Button"/>
    </map>
    See Example:
    Each area is essentially an invisible button. I want to make it so when the mouse hovers over the areas, I want the background image to display something different. On mouse out of the area, I want the image to go back. When the user clicks the Area, the user is moved to another part of the site.
    Area 1 should change Main_Image.jpeg to Main_Image1.jpeg
    Area 2 should change Main_Image.jpeg to Main_Image2.jpeg
    etc.
    I thought I could do this with Images Maps, but I can't figure out how. Is there an easier way? I have Dreamweaver CS4.
    Thank you in advance!

    Hey CF. Thank you very much for the reply! I thought I was losing my mind trying to figure out a way.
    I'll try out the slice and dice approach... where's a turtle when you need one.
    Cheers Dude.
    S

  • Images in spry menus

    I'd like to use small images/icons in my vertical spry menu
    bar. this works ok, exept that the white separation line (border)
    between the menu items disappears in those spesific cells. The
    cells containing just text keep their white line, and I simply
    can't find out where I manually can create this for the others.
    Anyone understand what I'm talking about?
    If you take a look at my site , and the spry menu on the
    left, you'll see. The white line between menu item 1 and 2 is
    missing...

    The security settings only apply when you view the file
    locally in IE, won't
    have any effect when you load the page.
    I don't have time to check/test the code right now, maybe a
    quick visit to
    the spry forum may get you some help - I believe you may need
    to set up a
    separate class so that you only get the one divider border on
    the top level
    and a different one on the sub menu (from memory :), it's
    been a while since
    I worked with the spry menu.
    Forum:
    http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=602
    Hope they can help you pretty quickly - sometimes there is a
    bit of a wait
    I'm afraid.
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    ~ Customisation Service Available ~
    http://www.csstemplates.com.au
    Spry Widget Examples
    http://www.dreamweaverresources.com/spry-widgets/
    ~ Forum Posting Guidelines ~
    http://www.adobe.com/support/forums/guidelines.html
    CSS Tutorials for Dreamweaver:
    http://www.adobe.com/devnet/dreamweaver/css.html
    "sykkeltyv" <[email protected]> wrote in
    message
    news:[email protected]...
    > Thnx for answering, Nadia!
    >
    > Well, now I got my thin black line around each cell of
    the menu, in
    > addition
    > to the white separation line between the items
    containing text. I only
    > want one
    > of these to show, regardless of wich one. So, can I
    remove the white line
    > already there, in some way?
    >
    > (one more clue that might help: When I preview this
    page, I have to accept
    > to
    > run active content (only due to security settings here
    at work). The white
    > line
    > between menu items only appear after I have accepted the
    activce content.
    > Does
    > this tell you anyting in order to find out where these
    settings can be
    > done?)
    >
    >
    quote:
    Originally posted by:
    Newsgroup User
    > Try adding the border to the following rule:
    >
    > /* Menu item containers, position children relative to
    this container and
    > are same fixed width as parent */
    > ul.MenuBarVertical li
    > {
    > margin: 0;
    > padding: 0;
    > list-style-type: none;
    > font-size: 100%;
    > position: relative;
    > text-align: left;
    > cursor: pointer;
    > width: 12em;
    > height: auto;
    > border: 1px solid black; <--------- added this line
    here
    >
    >
    >
    >

  • Help with image analysis Photoshop CS4 Extended

    Hi there - I recently went to the Birmingham NEC photo expo and saw a guy there giving a CS4 extended demo.  He showed how at the click of a button a folder of new photos were reduced to a smaller bunch of just the most tack-sharp ones.  I can't find out how to do this with my CS4 Extended - can anyone help - or am I just imagining it all  :-)))

    Sounds interesting.
    Did he do that in Photoshop itself or Bridge or Lightroom?
    Anyway, I suspect one could maybe achieve something like this in Photoshop with some fairly heavy Scripting, but I suspect the Script would have to actually open the images for analysis …

  • Urgent- Please help with image overlaying

    Hi,
    Please,please, can someone help me with an imaging issue and show me what I'm doing wrong.
    I'm a swing beginner and I'm trying to create a application for a board game. Currently I'm using JLabel components to try and create jpeg pieces over a JPanel component that has the board background.
    Currently I've written the code for the board background component and the pieces but can't get the image to appear on the background.
    Please can someone show me what I'm doing wrong.
    If someone can help me get this working, I've got 16 dollars from other posts in this forum I can give you.
    Thanks.
    public class BoardPanel extends JPanel {
    public BoardPanel()
    //Overwrite abstract painting method
    public void paintComponent(Graphics g)
    super.paintComponent(g);
              g.drawImage(backgroundImage,0,0,this.getWidth(), this.getHeight(), null);
    private Image backgroundImage = new ImageIcon("./Board.gif").getImage();
    public class PieceIcon extends JLabel {
    public PieceIcon(String symbol)
    System.out.println("./"+symbol+".jpg");
              pieceImage = new ImageIcon("./"+symbol+".jpg");
    public void paintComponent(Graphics g)
              super.paintComponent(g);
              g.drawImage(pieceImage,playerBoardPos.getX(),playerBoardPos.getY(), this);
    private Image pieceImage;
    Main:
    JPanel content = new JPanel();
    PieceIcon testPiece = new PieceIcon("Dog");
    BoardPanel boardIcon = new BoardPanel();
    getContentPane().add(content, java.awt.BorderLayout.CENTER);
    content.add(boardIcon, java.awt.BorderLayout.CENTER);
    boardIcon.setLayout(new javax.swing.OverlayLayout(boardIcon));
    boardIcon.add(testPiece);

    Oh, and since you probably won't be needing a layout manager, try the following:
    setLayout(null);
    ChessPeice peice1 = new ChessPeice(...);
    add(peice1);
    peice1.setBounds(x, y, width, height);also, your ChessPeice paintComponent method should look more like:
    ... //in constructor
    setPreferredSize(new Dimension(image.width, image.height));
    setOpaque(false);
    public void paintComponent(Graphics g){
       g.drawImage(...);
    }Make sure that if you call the component's getSize method to determine the width and height you do it after pack has been called. If you call getSize before then, it will return 0 for the width and height values.
    Another advantage to this approach is that the peices only draw in the areas they need to.
    Hope this helps.

Maybe you are looking for

  • ITunes not updating... please help.

    I plugged in my iPod to update and charge today... iTunes said it wanted to update to version 7.02 so I let it... then my iPod said it couldn't update and to restore to factory settings, so I did. Now the message I receive is "Songs on the iPod canno

  • Working on Windows 7, ran automatic updates recently, now Photoshop CS5 not working

    Hi there. I recently got a new laptop with Windows 7. I installed PS CS5 and have been using it with no problems until I ran automatic updates the day before yesterday, now my PS CS5 ACTS like it's open but really isn't. I can't view the screen, see

  • Why is the SSL Certificate "Edit" button disabled in Server Settings?

    I just setup my Lion server and am attempting to create a self-signed certificate. All of the directions start with "Run the Server app, go to your server, click the setting tabs, and push the 'Edit' button next to SSL Certificate". Well, I can't bec

  • Filter on keyword across multiple "folders"

    It is clear that I can filter for specified keyword within a "folder." This does not provide much convenience, it seems to me. I want to locate images with a given keyword across a large number of "folders" including even my entire C: drive. I must b

  • Itunes keep shutting down after opening

    I have uninstalled iTunes and reinstalled and still after I open it and it is "Matching" with iTunes Store and boom it comes up with iTunes not responding and shuts me down.  Where do I go from here?  It is a Microsoft Windows box and it says "iTunes