A little more help with image

I have refered to this thread to help me create my background image.
http://forum.java.sun.com/thread.jspa?threadID=599393&messageID=3196643
However I am stuck mostly because of not really fully grasping all the objects and how they work yet.
Basically right now I have a JFrame and then I have a container which I put all my objects in.
First question:
What exactly does the following line of code do?
Container contentPane = getContentPane();
Does the "getContentPane()" method get the JFrame, since this is the class this line of code is embedded in?
It sets contentPane which is a container to the JFrame?
Second question...
So using the above link I created a class called BackgroundImage and it works ...sort of. I have two windows - one is my JFrame game and the other is this background frame.
Now I knew this would happen and I realize what I am supposed to do but I have been unsuccessful. Basically I need to make this JPanel my contentPane right?
But when I say something like
JPanel contentPane = panel my JFrame has nothing in it...
How do I take this seperate window and incorporate it into what I already have.
I want to use the contentPane variable since this is the variable where everything gets added throughout the code? I can't seem to get the JPanel to work.
Take a look at some code snippets:
public class DungMast extends JFrame
    /** Creates a new instance of EventPress */
    public DungMast() {
        Animation_Complete=false;
        Current_Level = 1;
        Level_Complete = false;
        CreateUserInterface();
        JPanel panel = new JPanel()
        protected void paintComponent(Graphics g)
       //  Dispaly image at at full size
     g.drawImage(img_BG.getImage(), 0, 0, null);
     //  Scale image to size of component
//                    Dimension d = getSize();
//                    g.drawImage icon.getImage(), 0, 0, d.width, d.height, null);
                    //  Fix the image position in the scroll pane
//                    Point p = scrollPane.getViewport().getViewPosition();
//                    g.drawImage(icon.getImage(), p.x, p.y, null);
                    super.paintComponent(g);
         panel.setOpaque( false );
         panel.setPreferredSize( new Dimension(400, 400) );
         scrollPane = new JScrollPane( panel );
         getContentPane().add( scrollPane );
         JButton button = new JButton( "Hello" );
         panel.add( button );
    }  //end constructor for main JFrame
//Then I have something like
JPanel contentPane = panel;
}

What exactly does the following line of code do?
Container contentPane = getContentPane();
It gets the content pane for the JFrame and saves a reference to it for later use, viz,
the reference "contentPane" can be used to call methods in the Container class.
Lightweight (Swing) top–level containers have a content pane that holds the child
components for the parent container. See the comments section of the JRootPane class api
for a birds–eye view.
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.*;
import javax.imageio.ImageIO;
import javax.swing.*;
public class BackgroundImage {
    private JPanel getContent(BufferedImage image) {
        // Make up our own content pane with an image
        // in the background.
        ContentPanel cp = new ContentPanel(image);
        // Add some components.
        cp.setLayout(new GridBagLayout());
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.weightx = 1.0;
        gbc.weighty = 1.0;
        for(int j = 0; j < 10; j++) {
            gbc.gridwidth = (j+1)%3 == 0 ? gbc.REMAINDER : 1;
            cp.add(new JButton(String.valueOf(j+1)), gbc);
        return cp;
    public static void main(String[] args) throws IOException {
        BufferedImage image = ImageIO.read(new File("images/cougar.jpg"));
        BackgroundImage test = new BackgroundImage();
        JFrame f = new JFrame();
        System.out.println("Default contentPane = " +
                            f.getContentPane().getClass().getName());
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setContentPane(test.getContent(image));
        f.setSize(400,400);
        f.setLocation(200,200);
        f.setVisible(true);
class ContentPanel extends JPanel {
    BufferedImage image;
    public ContentPanel(BufferedImage image) {
        this.image = image;
        // This is required for JComponents that are used
        // as content panes since the Ocean LookAndFeel
        // (which can have non-opaque panels) was introduced.
        // Content panes must be opaque so they can draw
        // themseves and their child components.
        setOpaque(true);
        System.out.println("Default layout manager = " +
                            getLayout().getClass().getName());
    protected void paintComponent(Graphics g) {
        // Fill background with opaque color.
        super.paintComponent(g);
        int w = getWidth();
        int h = getHeight();
        int x = (w - image.getWidth())/2;
        int y = (h - image.getHeight())/2;
        g.drawImage(image, x, y, this);
}

Similar Messages

  • 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.
    >

  • [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...

  • Need more help with a GUI

    It's the ever popular Inventory program again! I'm creating a GUI to display the information contained within an array of objects which, in this case, represent compact discs. I've received some good help from other's posts on this project since it seems there's a few of us working on the same one but now, since each person working on this project has programmed theirs differently, I'm stuck. I'm not sure how to proceed with my ActionListeners for the buttons I've created.
    Here's my code:
    // GUICDInventory.java
    // uses CD class
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class GUICDInventory extends JFrame
         protected JPanel panel; //panel to hold buttons
         protected JPanel cdImage; // panel to hold image
         int displayElement = 0;
         public String display(int element)
                   return CD2[element].toString();
              }//end method
         public static void main( String args[] )
              new GUICDInventory();
         }// end main
         public GUICDInventory()
              CD completeCDInventory[] = new CD2[ 5 ]; // creates a new 5 element array
             // populates array with objects that implement CD
             completeCDInventory[ 0 ] = new CD2( "Sixpence None the Richer" , "D121401" , 12 , 11.99, 1990 );
             completeCDInventory[ 1 ] = new CD2( "Clear" , "D126413" , 10 , 10.99, 1998 );
             completeCDInventory[ 2 ] = new CD2( "NewsBoys: Love Liberty Disco" , "2438-51720-2" , 10 , 12.99, 1999 );
             completeCDInventory[ 3 ] = new CD2( "Skillet: Hey You, I Love Your Soul" , "D122966" , 9 , 9.99, 1998 );
             completeCDInventory[ 4 ] = new CD2( "Michael Sweet: Real" , "020831-1376-204" , 15 , 12.99, 1995 );
             //declares totalInventoryValue variable
                 double totalInventoryValue = CD.calculateTotalInventory( completeCDInventory );
              final JTextArea textArea = new JTextArea(display(displayElement));
              final JButton prevBtn = new JButton("Previous");
              final JButton nextBtn = new JButton("Next");
              final JButton lastBtn = new JButton("Last");
              final JButton firstBtn = new JButton("First");
              prevBtn.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent ae)
                        displayElement = (//what goe here? ) % //what goes here?
                        textArea.setText(display(displayElement));// <--is this right?
              nextBtn.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent ae)
                          displayElement = (//what goes here? ) % //what goes here?
                        textArea.setText(display(displayElement));// <--is this right?
              firstBtn.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent ae)
                        displayElement = 0;
                        textArea.setText(display(displayElement));// <--is this right?
              lastBtn.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent ae)
                        displayElement = //what goes here?;
                        textArea.setText(display(displayElement));// <--is this right?
              JPanel panel = new JPanel(new GridLayout(1,2));
              panel.add(firstBtn); panel.add(nextBtn); panel.add(prevBtn); panel.add(lastBtn);
              JPanel cdImage = new JPanel(new BorderLayout());
              cdImage.setPreferredSize(new Dimension(600,400));
              JFrame      cdFrame = new JFrame();
              cdFrame.getContentPane().add(new JScrollPane(textArea),BorderLayout.CENTER);
              cdFrame.getContentPane().add(panel,BorderLayout.SOUTH);
              cdFrame.getContentPane().add(new JLabel("",new ImageIcon("cd.gif"),JLabel.CENTER),BorderLayout.NORTH);
              cdFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              cdFrame.pack();
              cdFrame.setSize(500,200);
              cdFrame.setTitle("Compact Disc Inventory");
              cdFrame.setLocationRelativeTo(null);
              cdFrame.setVisible(true);
         }//end GUICDInventory constructor
    } // end class GUICDInventory
    // CD2.java
    // subclass of CD
    public class CD2 extends CD
         protected int copyrightDate; // CDs copyright date variable declaration
         private double price2;
         // constructor
         public CD2( String title, String prodNumber, double numStock, double price, int copyrightDate )
              // explicit call to superclass CD constructor
              super( title, prodNumber, numStock, price );
              this.copyrightDate = copyrightDate;
         }// end constructor
         public double getInventoryValue() // modified subclass method to add restocking fee
            price2 = price + price * 0.05;
            return numStock * price2;
        } //end getInventoryValue
        // Returns a formated String contains the information about any particular item of inventory
        public String displayInventory() // modified subclass display method
              return String.format("\n%-22s%s\n%-22s%d\n%-22s%s\n%-22s%.2f\n%-22s%s%.2f\n%-22s%s%.2f\n%-22s%s%.2f\n  \n" ,
                                       "CD Title:", title, "Copyright Date:", copyrightDate, "Product Number:", prodNumber , "Number in Stock:",
                                       numStock , "CD Price:" , "$" , price , "Restocking fee (5%):", "$", price*0.05, "Inventory Value:" , "$" ,
                                       getInventoryValue() );
         } // end method
    }//end class CD2
    // CD.java
    // Represents a compact disc object
    import java.util.Arrays;
    class CD implements Comparable
        protected String title; // CD title (name of product)
        protected String prodNumber; // CD product number
        protected double numStock; // CD stock number
        protected double price; // price of CD
        protected double inventoryValue; //number of units in stock times price of each unit
        // constructor initializes CD information
        public CD( String title, String prodNumber, double numStock, double price )
            this.title = title; // Artist: album name
            this.prodNumber = prodNumber; //product number
            this.numStock = numStock; // number of CDs in stock
            this.price = price; //price per CD
        } // end constructor
        public double getInventoryValue()
            return numStock * price;
        } //end getInventoryValue
        //Returns a formated String contains the information about any particular item of inventory
        public String displayInventory()
              //return the formated String containing the complete information about CD
            return String.format("\n%-22s%s\n%-22s%s\n%-22s%.2f\n%-22s%s%.2f\n%-22s%s%.2f\n%-22s%s%.2f\n  \n" ,
                                       "CD Title:", title, "Product Number:", prodNumber , "Number in Stock:",
                                       numStock , "CD Price:" , "$" , price , "Restocking fee (5%):", "$", price*0.05, "Inventory Value:" , "$" ,
                                       getInventoryValue() );
        } // end method
        //method to calculate the total inventory of the array of objects
        public static double calculateTotalInventory( CD completeCDInventory[] )
            double totalInventoryValue = 0;
            for ( int count = 0; count < completeCDInventory.length; count++ )
                 totalInventoryValue += completeCDInventory[count].getInventoryValue();
            } // end for
            return totalInventoryValue;
        } // end calculateTotalInventory
         // Method to return the String containing the Information about Inventory's Item
         //as appear in array (non-sorted)
        public static String displayTotalInventory( CD completeCDInventory[] )
              //string which is to be returned from the method containing the complete inventory's information
              String retInfo = "\nInventory of CDs (unsorted):\n";
              //loop to go through complete array
              for ( int count = 0; count < completeCDInventory.length; count++ )
                   retInfo = retInfo + "Item# " + (count + 1);          //add the item number in String
                   retInfo = retInfo + completeCDInventory[count].displayInventory();     //add the inventory detail in String
              }// end for
              return retInfo;          //return the String containing complete detail of Inventory
        }// end displayTotalInventory
         public int compareTo( Object obj ) //overlaod compareTo method
              CD tmp = ( CD )obj;
              if( this.title.compareTo( tmp.title ) < 0 )
                   return -1; //instance lt received
              else if( this.title.compareTo( tmp.title ) > 0 )
                   return 1; //instance gt received
              return 0; //instance == received
              }// end compareTo method
         //Method to return the String containing the Information about Inventory's Item
         // in sorted order (sorted by title)
         public static String sortedCDInventory( CD completeCDInventory[] )
              //string which is to be returned from the method containing the complete inventory's information
              String retInfo = "\nInventory of CDs (sorted by title):\n";
              Arrays.sort( completeCDInventory ); // sort array
              //loop to go through complete array
              for( int count = 0; count < completeCDInventory.length; count++ )
                   retInfo = retInfo + "Item# " + (count + 1);     //add the item number in String
                   retInfo = retInfo + completeCDInventory[count].displayInventory(); //add the inventory detail in String
              return retInfo;     //return the String containing complete detail of Inventory
         } // end method sortedCDInventory
    } // end class CD

    nextBtn.addActionListener(new ActionListener()
         public void actionPerformed(ActionEvent ae)
                   displayElement = (//what goes here? ) % //what goes here?
                   textArea.setText(display(displayElement));// <--is this right?
    });Above is your code for the "Next" button.
    You ask the question "What goes here"? Well what do you think goes there?
    If you are looking at item 1 and you press the "Next" button do you not want to look at item 2?
    So the obvious solution would be to add 1 to the previous item value. Does that not make sense? What problem do you have when you try that code?????
    Next you say "Is this right"? Well how are we supposed to know? You wrote the code. We don't know what the code is supposed to do. Again you try it. If it doesn't work then describe the problem you are having. I for one can't execute your code because I don't use JDK5. So looking at the code it looks reasonable, but I can't tell by looking at it what is wrong. Only you can add debug statements in the code to see whats happening.
    If you want help learn to as a proper question and doen't expect us to spoon feed the code to you. This is your assignment, not ours. We are under no obligation to debug and write the code for you. The sooner you learn that, the more help you will receive.

  • 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.

  • 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 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

  • 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.

  • Help With Image In IE

    Hello,
    I'm having difficulty with one image in IE. I've reviewed all the suggestions in other post although nothing is working. I've converted images from jpg, png. Image is sRGB in photoshop. Not sure what else I can do to get it to resolve. Any help would be greatly appreciated. Thanks
    <div class="box4-content">
    <!-- numo box right -->
    <img src="image folder/priceimage.png" width="600" height="216" />
    <h3>WTH Success Business Opportunity!</h3>

    I haven't published the site yet so I can't provide a link. Would it be helpfull to see the complete index file? Underlined and bold is the image I'm having issues with.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <!-- InstanceBegin template="/Templates/primary.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <!-- InstanceBeginEditable name="meta" -->
    <title>WTHSuccess</title>
    <meta name="Keywords" content="place your keywords here" />
    <meta name="Description" content="place a description for your webpage here" />
    <!-- InstanceEndEditable -->
    <!-- language content -->
    <meta name="language" content="en-US" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- fixed styles -->
    <link href="Site/styles/styles.css" rel="stylesheet" type="text/css" />
    <link href="Site/styles/primary.css" rel="stylesheet" type="text/css" />
    <!-- column styles -->
    <!-- InstanceBeginEditable name="styles" -->
    <style type="text/css">
    #column1_wrapper          {width:100%;                     border:0px;}
    #left1col                              {width:240px;                    float:left; padding-left:20px;}
    #left1pad                              {width:0px;                              float:left;}
    #right1col                              {width:0px;                              float:right;}
    #right1pad                              {width:0px;                              float:right;}
    #center1col                              {margin-left:240px; margin-right:0px;}
    #column2_wrapper          {width:100%;                     border:0px;}
    #left2col                              {width:33%;                              float:left;}
    #left2pad                              {width:0px;                              float:left;}
    #right2col                              {width:33%;                              float:right;}
    #right2pad                              {width:0px;                              float:right;}
    #center2col                              {margin-left:33%;           margin-right:33%;}
    #image_rotator_cover                    {background:url('Site/flash/image_rotator/skins/FL_imageRotatorCover.png') no-repeat center top; width:100%; height:246px; margin-left:auto; margin-right:auto;}
    </style>
    <!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name="flash_variables" -->
    <script type="text/javascript">
    // if this page is in:
    //   the root folder, then set this variable to ./
    //   a sub folder one level deep, then set this variable to ../
    //   a sub folder two levels deep, then set this variable to ../../
    var flashRootLocation = "./";
    var flashConfigLocation = "config";
    var flashConfigType = "xml"; // either xml or php
    </script>
    <!-- InstanceEndEditable -->
    <!-- Flash scripting -->
    <script type="text/javascript" src="Site/javascript/special_functions.js"></script>
    <script type="text/javascript" src="Site/logo/js/sifr.js"></script>
    <script type="text/javascript" src="Site/logo/js/sifr-debug.js"></script>
    <script type="text/javascript" src="Site/logo/js/sifr-config.js"></script>
    <script type="text/javascript" src="Site/flash/js/swfobject.js"></script>
    <!-- Menu scripting -->
    <script type="text/javascript" src="Site/javascript/jquery.min.js"></script>
    <script type="text/javascript" src="Site/javascript/ddsmoothmenu.js">
    * Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    </script>
    <!-- InstanceBeginEditable name="misc scripting" -->
    <!-- InstanceEndEditable -->
    <!-- IE6 PNG fix scripting -->
    <!--[if lte IE 6]>
    <script type="text/javascript" src="Site/javascript/supersleight-min.js"></script>
    <![endif]-->
    <!-- IE6 style -->
    <!--[if lte IE 6]>
              <script>
              document.write('<link href="Site/styles/ie6.css" rel="stylesheet" type="text/css" />')
              </script>
                        <noscript>
                        <link href="../Site/styles/ie6.css" rel="stylesheet" type="text/css" />
                        </noscript>
    <![endif]-->
    </head>
    <body>
    <!-- main -->
    <div id="main">
    <!-- content1 -->
    <div id="content1_bg"><div id="content1_wr"><div id="content1_l"></div><div id="content1_r"></div><div id="content1">
    <!-- content_bg -->
    <div class="content_bg"><div class="boxc"><div class="btc"><div></div></div><div class="i1c"><div class="i2c"><div class="i3c"><div class="boxc-inner"><div class="boxc-2"><div class="boxc-6"><div class="boxc-4"><div class="boxc-8"><div class="boxc-5"><div class="boxc-7"><div class="boxc-3"><div class="boxc-1"><div class="boxc-content">
    <!--SEO H1 -->
    <div id="seo_1">
    <!-- InstanceBeginEditable name="seo_h1" -->
    <h1>WTH Success</h1>
    <!-- InstanceEndEditable -->
    </div>
    <!--/SEO H1 -->
    <!--SEO H2 -->
    <div id="seo_2">
    <!-- InstanceBeginEditable name="seo_h2" -->
    <h2>Be Your Own Boss! Achieve Financial Freedom, Eternal Security and Happiness!</h2>
    <!-- InstanceEndEditable -->
    </div>
    <!--/SEO H2 -->
    <!-- InstanceBeginEditable name="content1_top" -->
    <!-- InstanceEndEditable -->
    <!-- content1 columns -->
              <div id="columns1"><div id="column1_wrapper">
                        <div id="left1pad"></div>
                                  <div id="left1col">
                                            <!-- InstanceBeginEditable name="left1" -->
                                                      <!-- whatsnew -->
                                                                <div class="whatsnew">
                                                                          <div class="box1"><div class="bt"><div></div></div><div class="i1"><div class="i2"><div class="i3"><div class="box1-inner"><div class="box1-2"><div class="box1-6"><div class="box1-4"><div class="box1-8"><div class="box1-5"><div class="box1-7"><div class="box1-3"><div class="box1-1"><div class="box1-content">
                                                                          <!--webbot bot="Include" U-Include="Library/expression-fp/$_whats_new.htm" TAG="BODY" startspan --><!-- #BeginLibraryItem "/Library/dreamweaver/$_whats_new.lbi" -->
    <h3>WhatsNew:</h3>
    <h4>First Heading or Title</h4>
    <h5>Septermber 16, 1926</h5>
    <p>
    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
    industry&#39;s standard dummy text ever since the 1500s.</p>
    <!-- #EndLibraryItem --><!--webbot bot="Include" i-checksum="54304" endspan -->
                                                                          </div></div></div></div></div></div></div></div></div> </div></div></div></div><div class="bb"><div></div></div></div>
                                                                </div>
                                                      <!-- /whatsnew -->
                                                      <!-- currentnews -->
                                                                <div class="currentnews">
                                                                          <div class="box1"><div class="bt"><div></div></div><div class="i1"><div class="i2"><div class="i3"><div class="box1-inner"><div class="box1-2"><div class="box1-6"><div class="box1-4"><div class="box1-8"><div class="box1-5"><div class="box1-7"><div class="box1-3"><div class="box1-1"><div class="box1-content">
                                                                          <!--webbot bot="Include" U-Include="Library/expression-fp/$_current_news.htm" TAG="BODY" startspan --><!-- #BeginLibraryItem "/Library/dreamweaver/$_current_news.lbi" -->
    <h3>CurrentNews:</h3>
    <h4>First Heading or Title</h4>
    <h5>Septermber 16, 1926</h5>
    <p>
    <a href="$_blank_minimized.htm">Lorem Ipsum</a> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
    industry&#39;s standard dummy text ever since the 1500s.
    </p>
    <!-- #EndLibraryItem --><!--webbot bot="Include" i-checksum="50797" endspan -->
                                                                          </div></div></div></div></div></div></div></div></div> </div></div></div></div><div class="bb"><div></div></div></div>
                                                                </div>
                                                      <!-- /currentnews -->
                                                      <!-- recentevents -->
                                                                <div class="recentevents">
                                                                          <div class="box1"><div class="bt"><div></div></div><div class="i1"><div class="i2"><div class="i3"><div class="box1-inner"><div class="box1-2"><div class="box1-6"><div class="box1-4"><div class="box1-8"><div class="box1-5"><div class="box1-7"><div class="box1-3"><div class="box1-1"><div class="box1-content">
                                                                          <!--webbot bot="Include" U-Include="Library/expression-fp/$_recent_events.htm" TAG="BODY" startspan --><!-- #BeginLibraryItem "/Library/dreamweaver/$_recent_events.lbi" -->
    <h3>RecentEvents:</h3>
    <h4>First Heading or Title</h4>
    <h5>Septermber 16, 1926</h5>
    <p>
    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
    industry&#39;s standard dummy text ever since the 1500s.</p>
    <!-- #EndLibraryItem --><!--webbot bot="Include" i-checksum="27171" endspan -->
                                                                          </div></div></div></div></div></div></div></div></div> </div></div></div></div><div class="bb"><div></div></div></div>
                                                                </div>
                                                      <!-- /recentevents -->
                                            <!-- InstanceEndEditable -->
                                  </div>
                        <div id="right1pad"></div>
                                  <div id="right1col">
                                            <!-- InstanceBeginEditable name="right1" -->
                                            <!-- InstanceEndEditable -->
                                  </div>
                                  <div id="center1col">
                                            <!-- InstanceBeginEditable name="body1" -->
    <div class="box4-content">
    <!-- numo box right -->
    <img src="image folder/priceimage.png" width="400" height="116" />
    <h3>WTH Success Business Opportunity!</h3>
    <p><strong><em>What if someone said they can remove all the stress in your  every day life? loss of job, medical bills, divorce, debt... what would you do? </em></strong></p>
    <p>Welcome to WTH Success network marketing business opportunity. We want to thank you for taking the time to understand how you can secure your financial freedom with this proven and very successful business strategy. </p>
    <p> WTH Success offers an &quot;out of the box&quot; home business opportunity where<strong><u> YOU GET PAID</u></strong> commission plus bonus opportunity for every distributor you sign up! The sky is the limit on how you can grow as a distributor and income you can earn! <em><strong>Ask yourself what could you do with extra income each month? $1000, $2000, $5,000, $10,000...?</strong></em></p>
    <p>WTHSuccess is a subsidiary of <a href="http://www.winthehunt.com">www.winthehunt.com</a> a penny auction website where you can win merchandise for pennies on the dollar. Many WTHSuccess distributors use their bids purchased through the business on the penny auction site to pay for items needed in every day life. As a distributor you have the ability to purchase bids and either use them yourself or hand them out to other potential distributors. There is a great benefit to being a member as you can win many of the items offered through the penny auction site such as giftcards for gas, retailers,  restraunts, or other great merchandise on top of commissions.</p>
    <p>WTHSuccess allows you the opportunity to earn money all while winning great items on winthehunt.com. What better way to achieve financial freedom while getting your every day needs such as gas and groceries virtually free!</p>
    <p>To understand more about the program and to become an active distributor click on the <a href="HowItworks.htm">How It Works</a> link at the top of the page and learn how you can start earning money today! </p>
    <p><img src="image folder/join button.jpg" width="160" height="100" align="absmiddle" /></p>
    <p> </p>
    <h4>Listen to the below testimonial:</h4>
    <p><object type="application/x-shockwave-flash" width="500" height="429"
    data="http://www.youtube.com/v/fYzuuAkeVvE?fs=1&hl=en_US&rel=0"><param name="movie" value="http://www.youtube.com/v/fYzuuAkeVvE?fs=1&hl=en_US&rel=0"/><param name="wmode" value="transparent" /></object> </p>
    <p> </p>
    <h6> </h6>
    <p> </p>
    <h3> </h3>
    <p> </p>
    </div>
    <p> </p>
                                            <!-- InstanceEndEditable -->
                                  </div><!--/center column -->
              </div></div><!-- columns -->
    <div class="clear"> </div>
    <!-- InstanceBeginEditable name="content1_bottom" -->
    <!-- InstanceEndEditable -->
    </div></div></div></div></div></div></div></div></div></div></div></div></div><div class="bbc"><div></div></div></div></div>
    <!-- /content_bg -->
    </div></div></div><!-- /content1 /content1_wr /content1_bg -->
    <!-- content2 -->
    <div id="content2_bg"><div id="content2_wr"><div id="content2_l"></div><div id="content2_r"></div><div id="content2">
    <!-- content_bg
    <div class="content_bg"><div class="boxc"><div class="btc"><div></div></div><div class="i1c"><div class="i2c"><div class="i3c"><div class="boxc-inner"><div class="boxc-2"><div class="boxc-6"><div class="boxc-4"><div class="boxc-8"><div class="boxc-5"><div class="boxc-7"><div class="boxc-3"><div class="boxc-1"><div class="boxc-content">
    -->
    <!-- InstanceBeginEditable name="content2_top" -->
    <p> </p>
    <!-- InstanceEndEditable -->
    <!-- conent2 columns -->
              <div id="columns2"><div id="column2_wrapper">
                        <div id="left2pad"></div>
                                  <div id="left2col">
                                            <!-- InstanceBeginEditable name="left2" -->
                                            <!-- InstanceEndEditable -->
                                  </div>
                        <div id="right2pad"></div>
                                  <div id="right2col">
                                            <!-- InstanceBeginEditable name="right2" -->
                                            <!-- InstanceEndEditable -->
                                  </div>
                                  <div id="center2col">
                                            <!-- InstanceBeginEditable name="body2" -->
                                            <!-- InstanceEndEditable -->
                                  </div>
              </div></div><!-- /columns2 / containers2 -->
    <div class="clear"> </div>
    <!-- InstanceBeginEditable name="content2_bottom" --><!-- InstanceEndEditable -->
    <!-- /content_bg
    </div></div></div></div></div></div></div></div></div></div></div></div></div><div class="bbc"><div></div></div></div></div>-->
    <!-- /content_bg -->
    </div></div></div><!-- /content2 /content2_wr /content2_bg -->
    <!-- header -->
    <div id="header_bg">
              <div id="header_wr"><div id="header_l"></div><div id="header_r"></div><div id="header">
    <!-- header_bg
    <div class="header_bg"><div class="boxh"><div class="bth"><div></div></div><div class="i1h"><div class="i2h"><div class="i3h"><div class="boxh-inner"><div class="boxh-2"><div class="boxh-6"><div class="boxh-4"><div class="boxh-8"><div class="boxh-5"><div class="boxh-7"><div class="boxh-3"><div class="boxh-1"><div class="boxh-content">
    </div></div></div></div></div></div></div></div></div></div></div></div></div><div class="bbh"><div></div></div></div></div> -->
    <!-- /header_bg -->
    <!-- InstanceBeginEditable name="header" -->
                                            <!--themed icons-->
                                            <div id="themed_icons">
                                            <!--webbot bot="Include" U-Include="Library/expression-fp/themed_icons.htm" TAG="BODY" startspan --><!-- #BeginLibraryItem "/Library/dreamweaver/themed_icons.lbi" -->
    <div class="icon_wrapper">
    <a href="index.htm">                              <img alt="icon1" title="Colins Place"                               src="Site/themed_images/themed_icon1.png" width="40" height="40" id="icon1" style="border:0px;" /></a>
    <a href="contact.htm">                    <img alt="icon2" title="contact"                     src="Site/themed_images/themed_icon2.png" width="40" height="40" id="icon2" style="border:0px;" /></a>
    <a href="sitemap.htm">                    <img alt="icon3" title="sitemap"                     src="Site/themed_images/themed_icon3.png" width="40" height="40" id="icon3" style="border:0px;" /></a>
    <a href="faqs.htm">                              <img alt="icon4" title="faqs"                               src="Site/themed_images/themed_icon5.png" width="40" height="40" id="icon4" style="border:0px;" /></a>
    <a href="contact.htm">                    <img alt="icon5" title="photo gallery"           src="Site/themed_images/themed_icon4.png" width="40" height="40" id="icon6" style="border:0px;" /></a>
    </div>
    <!-- #EndLibraryItem --><!--webbot bot="Include" i-checksum="31386" endspan --></div>
                                            <!--/themed icons-->
                                            <!--themed object-->
                                            <div id="themed_object">
                                            <!--webbot bot="Include" U-Include="Library/expression-fp/themed_object.htm" TAG="BODY" startspan --><!-- #BeginLibraryItem "/Library/dreamweaver/themed_object.lbi" -->
    <!-- #EndLibraryItem --><!--webbot bot="Include" i-checksum="60640" endspan --></div>
                                            <!--/themed object-->
                                            <!--themed object2-->
                                            <div id="themed_object2">
                                            <!--webbot bot="Include" U-Include="Library/expression-fp/themed_object2.htm" TAG="BODY" startspan --><!-- #BeginLibraryItem "/Library/dreamweaver/themed_object2.lbi" -->
    <!-- #EndLibraryItem --><!--webbot bot="Include" i-checksum="4131" endspan --></div>
                                            <!--/themed object2-->
                                            <!--logo graphic-->
                                            <div id="logo">
                                            <!--webbot bot="Include" U-Include="Library/expression-fp/logo_graphic.htm" TAG="BODY" startspan --> <!-- #BeginLibraryItem "/Library/dreamweaver/logo_graphic.lbi" -->
    <!-- add logo graphic here -->
    <!-- add logo graphic here -->
    <!-- #EndLibraryItem -->
    <!--webbot bot="Include" i-checksum="26000" endspan --></div>
                                            <!--/logo graphic-->
                                            <!--logo website name-->
                                            <div id="textlogo">
                                            <!--webbot bot="Include" U-Include="Library/expression-fp/logo.htm" TAG="BODY" startspan --><!-- #BeginLibraryItem "/Library/dreamweaver/logo.lbi" -->
    <p><a href="index.htm">WTH Success</a></p>
    <p> </p>
    <!-- #EndLibraryItem --><!--webbot bot="Include" i-checksum="392" endspan --></div>     
                                            <!--/logo website name-->
                                            <!-- menu_bg
                                            <div class="menu_bg_wr"><div class="menu_bg"><div class="boxm"><div class="btm"><div></div></div><div class="i1m"><div class="i2m"><div class="i3m"><div class="boxm-inner"><div class="boxm-2"><div class="boxm-6"><div class="boxm-4"><div class="boxm-8"><div class="boxm-5"><div class="boxm-7"><div class="boxm-3"><div class="boxm-1"><div class="boxm-content">
                                            -->
                                            <!-- menu top -->
                                            <script type="text/javascript">ddsmoothmenu.init({mainmenuid: "smoothmenu1", orientation: 'h', classname: 'ddsmoothmenu', contentsource: "markup" })</script>
                                            <div id="menu_top"><div id="smoothmenu1" class="ddsmoothmenu">
                                            <!--webbot bot="Include" U-Include="Library/expression-fp/menu_top.htm" TAG="BODY" startspan --><!-- #BeginLibraryItem "/Library/dreamweaver/menu_top.lbi" -->
    <ul>
              <li><a href="index.htm">Home</a></li>
              <li><a href="services.htm">How It Works</a></li>
              <li><a href="services.htm">Getting Paid</a></li>
                <li><a href="contact.htm">Contact Us</a></li>
                <li><a href="index.htm">Join</a></li>
                <li><a href="index.htm">Login</a></li>
    </ul>
    <!-- #EndLibraryItem --><!--webbot bot="Include" i-checksum="38016" endspan --><br style="clear: left" /></div></div>
                                            <!-- /menu top -->
                                            <!-- /menu_bg
                                            </div></div></div></div></div></div></div></div></div></div></div></d iv></div><div class="bbm"><div></div></div></div></div></div>-->
                                            <!-- /menu_bg -->
                                            <!--mp3-->
                                            <div id="mp3_component">
                                            <!--webbot bot="Include" U-Include="Site/flash/mp3/mp3.htm" TAG="BODY" startspan --><!-- #BeginLibraryItem "/Site/flash/mp3/mp3.lbi" -->
    <script type="text/javascript">
                                  var flashvars            = {};
                                  flashvars.configLocation = flashConfigLocation;
                                  flashvars.playMusic                     = playMusic;
                                  var params               = {};
                                  params.play              = "true";
                                  params.loop              = "true";
                                  params.quality           = "high";
                                  params.scale             = "showall";
                                  params.wmode             = "transparent";
                                  params.devicefont        = "false";
                                  params.swliveconnect     = "false";
                                  params.allowfullscreen   = "false";
                                  params.allowscriptaccess = "sameDomain";
                                  params.base              = flashRootLocation + "Site/flash/";
                                  var attributes   = {};
                                  attributes.id    = "flashheader";
                                  attributes.name  = "mp3";
                                  attributes.align = "middle";
                                  swfobject.embedSWF(flashRootLocation + "Site/flash/mp3.swf", "headerDivmp3", "296", "67", "9.0.0", flashRootLocation + "Site/flash/js/expressInstall.swf", flashvars, params, attributes);
                        </script>
    <!-- mp3 -->
    <div id="mp3_wrapper"><div id="mp3"><div class="mp3">
              <div id="headerDivmp3" style="width:296px; height:67px;">
                                  <a href="http://www.adobe.com/go/getflashplayer">
                                            <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
                                  </a>
              </div>
    </div></div></div>
    <!-- /mp3 -->
    <!-- #EndLibraryItem --><!--webbot bot="Include" i-checksum="37310" endspan --></div>      
                                            <!--/mp3-->
                                            <!--twitter-facebook-->
                                            <div id="twitter-facebook">
                                            <!--webbot bot="Include" U-Include="Library/expression-fp/twitter-facebook.htm" TAG="BODY" startspan --><!-- #BeginLibraryItem "/Library/dreamweaver/twitter-facebook.lbi" -->
    <div>
    <a href="http://www.facebook.com/winthehunt/">          <img alt="follow me on facebook"           title="Facebook"           src="Site/themed_images/facebook_badge.png"                     width="36" height="36" style="border:0px;" /></a>
    <a href="http://www.twitter.com/#!/winthehunt">          <img alt="tweet me"                                         title="Twitter"           src="Site/themed_images/t_logo-a.png"                               width="36" height="36" style="border:0px;" /></a>
    </div>
    <!-- #EndLibraryItem --><!--webbot bot="Include" i-checksum="49610" endspan --></div>
                                            <!--/twitter-facebook-->
    <!-- InstanceEndEditable -->
              </div></div></div>
    <!-- /header /header_wr /header_bg -->
    <!-- InstanceBeginEditable name="components" -->
                                            <!--imagerotator-->
                                            <div id="image_rotator_wrapper"><div id="image_rotator_component">
                                            <!--webbot bot="Include" U-Include="Site/flash/image_rotator/image_rotator.htm" TAG="BODY" startspan --><!-- #BeginLibraryItem "/Site/flash/image_rotator/image_rotator.lbi" -->
    <script type="text/javascript">
                                  var flashvars            = {};
                                  flashvars.configLocation = flashConfigLocation;
                                  flashvars.configType = flashConfigType;
                                  var params               = {};
                                  params.play              = "true";
                                  params.loop              = "true";
                                  params.quality           = "high";
                                  params.scale             = "showall";
                                  params.wmode             = "transparent";
                                  params.devicefont        = "false";
                                  params.swliveconnect     = "false";
                                  params.allowfullscreen   = "false";
                                  params.allowscriptaccess = "sameDomain";
                                  params.base              = flashRootLocation + "Site/flash/";
                                  var attributes   = {};
                                  attributes.id    = "flashheader";
                                  attributes.name  = "image_rotator";
                                  attributes.align = "middle";
                                  swfobject.embedSWF(flashRootLocation + "Site/flash/image_rotator.swf", "headerDivimage_rotator", "1680", "244", "9.0.0", flashRootLocation + "Site/flash/js/expressInstall.swf", flashvars, params, attributes);
                        </script>
    <!-- image_rotator -->
    <div id="image_rotator_wrapper"><div id="image_rotator"><div class="image_rotator">
              <div id="headerDivimage_rotator"><img src="Site/themed_images/image_rotator1.jpg" alt="Welcome Image" style="border:0px;" />          </div>
    <div id="image_rotator_cover_wrapper"><div id="image_rotator_cover"></div></div>
    </div></div></div>
    <!-- /image_rotator -->
    <!-- #EndLibraryItem --><!--webbot bot="Include" i-checksum="43908" endspan --></div></div>   
                                            <!--/imagerotator-->
    <!-- InstanceEndEditable -->
    <!-- footer -->
    <div id="footer_bg"><div id="footer_wr"><div id="footer_l"></div><div id="footer_r"></div><div id="footer">
    <!-- footer_bg -->
    <div class="footer_bg"><div class="boxf"><div class="btf"><div></div></div><div class="i1f"><div class="i2f"><div class="i3f"><div class="boxf-inner"><div class="boxf-2"><div class="boxf-6"><div class="boxf-4"><div class="boxf-8"><div class="boxf-5"><div class="boxf-7"><div class="boxf-3"><div class="boxf-1"><div class="boxf-content">
                                   <!-- InstanceBeginEditable name="footer" -->
    <!--webbot bot="Include" U-Include="Library/expression-fp/footer.htm" TAG="BODY" startspan --><!-- #BeginLibraryItem "/Library/dreamweaver/footer.lbi" -->
    <div class="footer_wrapper" style="width:100%; text-align:center;">
    <p> </p>
    <p>Copyright 2012.WinTheHunt, LLC. All Rights Reserved.</p>
    <p>
              <a href="index.htm">Home</a> |
              <a href="TermsandConditions.htm">Terms</a> |<a href="services.htm">Getting Paid</a>| <a href="contact.htm">Contact </a>|
              <a href="privacy.htm">Privacy</a> |
              <a href="sitemap.htm">Sitemap</a>
    </p>
    </div><!-- #EndLibraryItem --><!--webbot bot="Include" i-checksum="63035" endspan -->
                                  <!-- InstanceEndEditable -->
    </div></div></div></div></div></div></div></div></div></div></div></div></div><div class="bbf"><div></div></div></div></div>
    <!-- /footer_bg -->
    </div></div></div>
    <!-- /footer /footer_wr /footer_bg -->
    </div>
    <!-- /main -->
    <!-- adsense or advertising space -->
    <div id="adsense"><div id="adsense_wrapper">
    <!-- copy adsense or advertising code here -->
    </div></div>
    <!-- scripts or trackers1 -->
    <div id="special1"><!-- InstanceBeginEditable name="special1" -->
                        <p> </p>
                                            <!-- InstanceEndEditable --></div>
    <!-- /scripts or trackers1 -->
    <!-- scripts or trackers2 -->
    <div id="special2"><!-- InstanceBeginEditable name="special2" -->
                        <p> </p>
                                            <!-- InstanceEndEditable --></div>
    <!-- /scripts or trackers2 -->
    </body>
    <!-- InstanceEnd -->
    </html>

  • PSE newbie frustrated, please help with image resizing

    Hi!
    Tutorials aren't helping me, nor is trial and error. I just want to resize some photos I downloaded to my computer, then upload them to a website to use as my avatar or signature. There are specific pixel dimensions I must adhere to. I want to keep the photo in it's entirety, but when I resize it, it distorts a bit, looks fuzzy...
    I can't figure out what the heck I am doing wrong. Some pictures turn out just fine and others look really bad. I know it can be done because I've seen the same pictures I'm trying to size, being used for the same thing I want to use them for, but theirs are clear, absolutely no distortion whatsoever. The pixel dimensions I have to work with are either 100x100, or 450 pixels wide by 90 pixels high.
    I hope this made sense, I'm not sure how else to word it. Please forgive my ignorance, I've really been trying.
    Thank-you
    B

    For an avatar it’s possibly best to crop to begin with so you get a true square.
    Open the image and select the crop tool and change the aspect ratio to 1 x 1 or 5 x 5 then drag out a square and move the image around inside it or drag the bounding box borders until you have it looking as you want. Then click the green check mark.
    On the top menu click Image > Resize > Image Size and in either the height or width box type 100 px (you only need to type the dimension once the other box will change to 100 automatically. Make sure you have the bottom three boxes checked:
    Scale Styles
    Constrain Proportions
    Resample Image
    With all three checked set the bottom dropdown to Bicubic and then hit OK.
    If you want to apply some sharpening select Enhance on the top menu and choose Unsharp Mask.
    Make sure the Radius is no more than 1.5 and use the amount slider to get the image looking as you want it then save.
      

  • Displaying more metadata with Image?

    would anyone mind pointing me to the controls that set what i see under an image when i am not in list view? i would like to see items such as file size, pixel size and camera while looking at reasonably large image sizes (can't really do this in list view) and while I have read the manual and have access to online help some of these are a little tricky to find.
    TIA

    There are two kinds of panes used to show your Images.  They are
    - Browser
    - Viewer
    The Browser displays the Image(s) in the currently selected container(s).
    The Viewer shows the selected Image(s) in the currently selected container(s).
    There are Four main Views in Aperture.  They are
    - Browser View
    - Viewer View
    - Split View
    - Projects View
    Split View shows you two panes: one Browser pane and one Viewer pane.
    Projects View is specialized for showing you your Projects and is not used to view your Images (though you can skim Projects and see the Images in each one).
    The Images displayed in each viewing pane (Browser or Viewer) can be displayed with metadata.  (Metadata can also be displayed on the Metadata tab of the Inspector.)  For each pane you can show or not show metadata.  You can also switch between two customizable sets of metadata.  Metadata displayed in this way is called a Metadata Overlay.  The customizable sets are called "Basic" and "Expanded".
    The Browser pane has some additional functionality that is not available in the Viewer pane.  You can sort, and you can filter, the Images displayed in the Browser at any time.  You can also view the Images displayed in the Browser pane in either Grid View or in List View.  Browser Grid View and Browser List View have their own Metadata Overlays.
    Thus far we've covered six of the seven Metadata Overlays.  They are
    - Viewer:  Basic and Expanded
    - Browser Grid View:  Basic and Expanded
    - Browser List View:  Basic and Expanded
    There is one additional Metadata Overlay:  the Tooltip Metadata Overlay.  All of these are covered -- with full instructions on use -- on the Metadata pages in the User Manual.
    All of this is covered in the first seven chapters of the User Manual -- a must read for anyone new to Aperture.  Additionally, many find setting up a test Library and experimenting with these settings is very helpful in quickly getting up to speed with Aperture.

  • More help with GREP needed

    I have been attempting to create some nested styles.
    So far, I am getting the hang of it.
    I have created a grep style that will make all text after the word "NOTE: " into italic. Also, I have grep style that makes all text that is "FIGURE +\d+\d" into bold text.
    The problem I have is that if the word "FIGURE " etc. is in the italicized note text, then it will not become bold.
    For example: "Operate the switch to begin the process (FIGURE 3-3). Make sure guards are closed (refer to FIGURE 3-1)."
    That works fine, and "FIGURE " is bold. However, when I change the sentence by adding "NOTE: Make sure guards... " it all becomes italic, and I loose the bold on "FIGURE 3-1"
    So, is there a way to augment my italic grep with some kind of inclusion... as if I were saying "if "FIGURE +\d+\d" make that is bold italic"
    sorry for the long-winded attempt to describe what I want to do.
    Thanks in advance for help.
    RPP

    RPP,
    The trouble is that in GREP style you can find text but not formatting, so you can't say something like "find FIGURE only when it's italic". In the Find/Change dialog you can, but in GREP styles you can't.
    You also can't say "look for FIGURE if it's preceded by NOTE: and any characters in between". Unfortunately, lookbehind can't cope with variable-length text. So if you always have "NOTE: Refer to FIGURE ...", then you can use lookbehind and you set-up would be this:
    apply italic to FIGURE [-\d]+
    apply bold to NOTE:.+
    apply bold-italic to (?<=NOTE: Refer to )FIGURE [-\d]+
    The first parenthetical is a lookbehind: in this case, FIGURE looks behind, meaning you find FIGURE only when it's preceded by "Note: Refer to", which is not matched itself. So bold italics would be applied only to FIGURE [-\d]+, and only when preceded by ...
    But you're not likely to have such fixed text. When you have just a few alternatives, you can list them as alternatives, so if you always have "Note: Refer to " or "NOTE: See " you could salvage your set-up, but with more than let's say three alternatives it gets messy.
    (?<=NOTE:.+? )FIGURE [-\d]+ , which you would hope would match any text from NOTE: to FIGURE, doesn't work as a lookbehind.
    Peter

  • 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 …

Maybe you are looking for

  • Email notification for MeetingPlace not being received

    Client has MeetingPlace 7.1.1 installed. Outlook email notification for MeetingPlace stopped working. Problem symptom:  When users try to schedule a meeting from web server page, both scheduler and invitee do not receive email notifcaiton in their em

  • Statistics/memory for 10g database

    can anybody guide me how much memory needed for one oracle 10g database? can anybody share the statistics on each oracle 10g process memory? - we are in the process of building production databases and would like to have some estimates/statistics

  • Installing Firefox with WIN 8.1

    After installing Firefox I cannot open the programme as I get the pop up saying the http address is wrong. I have installed and used Firefox on this Toshiba laptop before with no problems.

  • Aligning whole web page for browser in Dreamweaver CS4

    Hi, I am trying to align my web page so that it is central on screen when viewed in a browser? Can any one help??! Thanks. Andrew.

  • Ios6 download

    Trying to update my iphone 4 with the ios6 update and when I started update with icloud it finished and prompted me to conect to itunes.  When conected it tells me that the iphone update server can not be found.  I have update itunes and restarted se