Cant get loadmovie to display image

I have this for loop where I am circling through an array.  I have swf's for each of the numbers like dropTarget_1.swf, etc.  For whatever reason I can't seen to get this loaded into my holder.
When I hard code it then it works. Any advice?
for (n=1; n<=myDropDetails.length; n++) {
  rand = nums.splice(random(nums.length), 1)[0];
  trace(rand);
  this.createEmptyMovieClip("holder",n);
  this["dropTarget"+rand+".swf"],holder)
  loadMovie("dropTarget_"+rand+".swf", holder);
holder._x=holder._x+30
  //holder.loadMovie("dropTarget_1.swf");

There are too many things confused in your code to be sure what you are trying to tell it to do at times.  Here is a revised coding that may be what you are after.  Even if it isn't, it may be a better place to start to resolve things from.
function shuffle(a:Array):Array {
var len:Number = a.length-1;
for (var ivar:Number = len; ivar>=0; ivar--) {
  var p:Number = Math.floor(Math.random()*(ivar+1));
  var t = a[ivar];
  a[ivar] = a[p];
  a[p] = t;
return a;
var nums = new Array(1,2,3);
var xLoc = 0;
nums = shuffle(nums); // randomize the nums array
for (n=0; n<=nums.length-1; n++) {
      this.createEmptyMovieClip("holder"+n,this.getNextHighestDepth());
      loadMovie("dropTarget_"+nums[n]+".swf", this["holder"+n]);
      this["holder"+n]._x = xLoc;
      xLoc += 30;

Similar Messages

  • Cant get adobe to display on screen

    Cant get adobe to display on screen!   Anyone know?

    Adobe what? Adobe is a company, one who makes a number of software products. You'll need to tell us what software it is you're trying to use and the exact nature of the problem before anyone can offer advice. It will also help if you tell us what version of Mac OS X your system is running.
    Adobe has their own forums, by the way. You'll probably be most likely to get help in using their products there:
    http://forums.adobe.com/community/
    Regards.

  • HT1212 my ipod has "ipod is disabled connect ti itunes" but it will not let me put in the passcod or anything! i cant get off this display?

    my ipod has "ipod is disabled connect ti itunes" but it will not let me put in the passcod or anything! i cant get off this display?

    You have to restore:
    Forgotten Passcode or device disabled after entering wrong passcode

  • PE9 get confused about displaying images

    Been using PE9 for a few weeks and within the past couple of days it seems to get confused about which image should be displayed within the timeline. Have a medium size project with 30-40 jpg's in it and when shown in the timeline (or in the monitor window), PE9 replaces the image associated with a particular file with an image from another file. In the Project list you can get Properties and the path\file name shows up perfectly but PE9 uses the image from another file. Tried closing the project, and PE9 - no help. Tried re-booting Windows 7 (64 bit) - nop help. This seems to get worse as time goes on and I have not been able to find a solution.
    Bob

    My photo's are either 720 x 480 or 720 x 1080 depending on whether they are landscape or portrait.

  • Can't get Safari to display images of cleared checks from bank

    When I view my bank transactions on-line, the occasional cleared paper check transaction I wish to see will not display in Safari when I click on it. A check image window appears, but no content. Not a problem in other browsers.

    Stephen, check with your bank to see why it doesn't display. The cancelled checks at my bank account show so it must be something your bank has set.

  • How do I get firefox to display images clearly? I've got Windows 2000 Pro and Firefox 3.6.6. Internet Explorer shows images clearly, so I'm sure I have the correct graphics driver. Do I need a plugin or add-on of some sort? When I go to "updates", it

    When I use Firefox the images and logos don't show up clearly/correctly. I'm using Windows 2000 Pro. and just installed Firefox 3.6.6. I'm sure I have the right graphics driver as I'm able to see the images and logos clearly in Internet Explorer. I only have the "default plugin 1.0.0.15" installed. I'm thinking that I'm missing a plugin or add-on of some sort, but I'm not sure which one(s). When I go to "updates" it says there were no updates available. When I go to "Add-ons" it gives a list of Add-ons but I'm not sure which would help my issue. Any help would be appreciated.:)
    == This happened ==
    Every time Firefox opened
    == I decided to Download and Use Firefox on this computer. I was using IE before, and it works fine. ==
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4

    Firefox works fine on Windows 2000 SP4 for me.
    Any chance you have a dial-up connection that uses a web accelerator to speed the loading of content?

  • Cant get my head round delimited files

    hey guys i have been trying to sort this out for ages but i just cant get it to display correctly just wondering if any one could help
    Create a comma delimited file for example:
         Smith, Jon
         Bloggs, Fred
         Jones, Anne
    Then simply read each item of data and display it to look like this:
         Jon Smith
         Fred Bloggs
         Anne Jones
    i have made a .txt files with the names in but i cant get them to display like it ask me to i can get rid of the comma and move the text around but i cant get it in that order

    i have displayed them so that they display on the same line just havin trouble swaping them around
    import java.io.File;
    import java.util.Scanner;
    public class URLScan {
         public static void main(String[] args)throws Exception {
              String url;
              Scanner filescan, urlscan;
              filescan = new Scanner(new File("url.txt"));
              while(filescan.hasNext()){
                   url = filescan.nextLine();
                   System.out.println("URL: "+url);
                   urlscan = new Scanner(url); urlscan.useDelimiter(",");
                   System.out.print("\f"+urlscan.next());
                   System.out.println("\t"+urlscan.next());
                   while (urlscan.hasNext()){
    }

  • Displaying images in imail

    How do I get mail to display images instead of able square with a ?
    Keith

    Mail > Preferences > Viewing
    Enable "Display remote images in HTML messages".
    For additional info:
    https://discussions.apple.com/thread/4246957?start=15&tstart=0

  • Ghost 970 6gb mini display port to Asus pg278Q 144hz cant get to work

    I am using a straight mini display port cable to display port no adapter and I can only get 120hz. It seems like it has to do with the fact the monitor is using the intel 4600 gpu instead of the 970m. Is there anyway around this? I changed the setting in nvidia control panel to use it all the time but does not help. Is there any setting I can do?
    I cant get 144hz and therefore cannot get g-sync to work. I have searched these forums but cant seem to find a clear answer.

    Currently none of MSI laptops support G-Sync, only the dock for GS30 supports (because it's actually a desktop).
    I heard MSI they are still working on this but not sure if current models can be patched to support G-Sync or only new models support.

  • Displaying image in JTable gets me nothing

    Hi everyone,
    I created a subclass of JTable which's TableModel is a subclass of AbstractTableModel. My table is supposed to display images in one of the columns but for some reasons I got nothing displayed in that column. I made the column editable so I can check wheter cells are holding something and when I double click any cell of this column I get the path to the image displayed so I know it's there. When I change the getColumnClass for it to return the String class the path to the image is also displayed.
    Here's the code of the getColumnClass function :
         @Override
         public Class<?> getColumnClass(int columnIndex) {
              Class<?> c = String.class;
              if( columnIndex == 2 ){
                   return ImageIcon.class;
              else if( columnIndex == 4 ){
                   c = JComboBox.class;
              return c;
         }Any idea of what I did wrong ?
    Julien

    Julien_Java_Developer wrote:
    Any idea of what I did wrong ?
    JulienYup. You didn't post a [_SSCCE_|http://mindprod.com/jgloss/sscce.html], so we don't know what data is in your table model, we don't know whether you're silintly swallowing any exceptions, we don't know ...
    Heck, we don't know anything that might help us to suggest a fix.
    Also, it looks like you're storing JComboBoxes in the model, which isn't a good idea.
    db

  • Cant get external Monitor to run under Mountain Lion with Dr. Bott Mini Display port Adapter and Mac book Pro Retina!

    Hey there,
    somehow I cant get my Zalman Trimon Monitor to run on my new Mac book pro (2012, Retina). I tried hooking it up with the Dr. Bott Mini Display port Adapter see here  ( http://www.google.de/products/catalog?client=safari&rls=en&oe=UTF-8&redir_esc=&q =dr.+bott+mini+displayport&um=1&ie=UTF-8&tbm=shop&cid=9085840057573220630&sa=X&e i=rHMeULWUNo7ysgaZvYGYAg&ved=0CHIQ8gIwBg#ps-sellers )
    Neither on my new mac book (with thunderbold) nore with the 2010 Mac book pro 13 inch from my girlfriend both running Mountain Lion, would it work. Does anyone has the same troubles or knows a reason or fix? The monitor definitly works (tried with my old mac book) and this is already the second adapter I use, since I thought maybe the adapter doesnt work!
    Help appreciated!

    Hm, i cannot reproduce the kernel_task thing right now, but this is my temp after working with 2 screens for 10 minutes. is this normal?
    100° cpu, 96° on the diode, and 78 on GPU chip? it even was 82 once.
    when do i reach critical limits?
    apple?

  • Cant get image to load in JApplet - java.security.AccessControlException

    hi,
    I need to make a JApplet that loads and displays images. Before I worry about media tracker or anything else I need to get the image to load.
    My code is:
    package Applet;
    import java.awt.*; 
    import javax.swing.*;
    import java.applet.*;
    * @author Nick
    public class TestJApplet extends JApplet {
        /** Creates a new instance of TestJApplet */
        public TestJApplet() {
        public void init()
        public void paint(Graphics g)
            Image image;
            image = getImage(this.getDocumentBase(),"a.gif");
            g.drawRect(30,30,30,30);
    }where a.gif is located in the same folder as the .java file.
    I get the following message:
    Exception in thread "AWT-EventQueue-1" java.security.AccessControlException: access denied (java.io.FilePermission \C:\Documents and Settings\Nick\Math\build\a.gif read)
            at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
            at java.security.AccessController.checkPermission(AccessController.java:427)
            at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
            at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
            at sun.awt.image.URLImageSource.<init>(URLImageSource.java:37)
            at sun.applet.AppletImageRef.reconstitute(AppletImageRef.java:33)
            at sun.misc.Ref.get(Ref.java:47)
            at sun.applet.AppletViewer.getCachedImage(AppletViewer.java:377)
            at sun.applet.AppletViewer.getImage(AppletViewer.java:372)
            at java.applet.Applet.getImage(Applet.java:236)
            at java.applet.Applet.getImage(Applet.java:258)
            at Applet.TestJApplet.paint(TestJApplet.java:27)
            at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
            at sun.awt.RepaintArea.paint(RepaintArea.java:224)
            at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:254)
            at java.awt.Component.dispatchEventImpl(Component.java:4031)
            at java.awt.Container.dispatchEventImpl(Container.java:2024)
            at java.awt.Component.dispatchEvent(Component.java:3803)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Exception in thread "AWT-EventQueue-1" java.security.AccessControlException: access denied (java.io.FilePermission \C:\Documents and Settings\Nick\Math\build\a.gif read)
            at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
            at java.security.AccessController.checkPermission(AccessController.java:427)
            at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
            at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
            at sun.awt.image.URLImageSource.<init>(URLImageSource.java:37)
            at sun.applet.AppletImageRef.reconstitute(AppletImageRef.java:33)
            at sun.misc.Ref.get(Ref.java:47)
            at sun.applet.AppletViewer.getCachedImage(AppletViewer.java:377)
            at sun.applet.AppletViewer.getImage(AppletViewer.java:372)
            at java.applet.Applet.getImage(Applet.java:236)
            at java.applet.Applet.getImage(Applet.java:258)
            at Applet.TestJApplet.paint(TestJApplet.java:27)
            at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
            at sun.awt.RepaintArea.paint(RepaintArea.java:224)
            at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:254)
            at java.awt.Component.dispatchEventImpl(Component.java:4031)
            at java.awt.Container.dispatchEventImpl(Container.java:2024)
            at java.awt.Component.dispatchEvent(Component.java:3803)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)Could someone help me get an image to load in an Applet/JApplet.
    Cheers :)

    From looking at your code there are two problems... the first is that you have a security exception being thrown because you are attempting to load a file locally with insufficient privileges to do so. This is because Applets have additional security levied on them so they don't say, in this circumstance steal a file off the loaded machine and send it back to the server that delivered them.
    If you want to get your applet to load a local file (I don't think that is what you're asking here) then you have to digitally sign your applet and allow the user to decide if they want to be allow it to load a local file.
    Nutshell is that you need to understand that the URL returned from getDocumentBase() in an applet is going to be from the Jar file you send the applet with or the URL you served the applet from. This is a bit of debugging code to show you what you are looking at and hopefully explain anything ambiguous I may have stated.
    package testapplication;
    import java.awt.EventQueue;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    * Description : <p></p>
    * @author John Michael Resler<br/>
    * Class : DocBaseApplet<br/>
    * Creation Time : 8:31 AM<br/>
    * Creation Date : June 18, 2006<br/>
    * Compiler : Sun Java Community Edition (version 1.5.0_06)<br/>
    public class DocBaseApplet extends javax.swing.JApplet implements MouseListener {
         * Initializes the applet DocBaseApplet
        public void init() {
            try {
                EventQueue.invokeAndWait(new Runnable() {
                    public void run() {
                        initComponents();
            } catch (Exception ex) {
                ex.printStackTrace();
        private void initComponents() {
            documentBaseLabel = new javax.swing.JLabel();
            documentBaseLabel.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    documentBaseLabelMouseClicked(evt);
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(documentBaseLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(documentBaseLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE)
                    .addContainerGap())
        private void documentBaseLabelMouseClicked(java.awt.event.MouseEvent evt) {                                              
            // TODO add your handling code here:
            this.documentBaseLabel.setText(this.getDocumentBase().toString());
        public void mouseClicked(MouseEvent e) {
        public void mousePressed(MouseEvent e) {
        public void mouseReleased(MouseEvent e) {
        public void mouseEntered(MouseEvent e) {
        public void mouseExited(MouseEvent e) {
        private javax.swing.JLabel documentBaseLabel;
    }

  • HT201317 Cant get Camera Roll or Photo Stream images off my iphone 4

    Cant get Camera Roll or Photo Stream images off my iphone 4.  Ive got everything turned on to support the icloud function and my itunes shows syncing, but nothing. Any ideas what Im missing?  Thanks A Million!

    You can delete them from your phone by opening the album that contains them, tap Edit, tap the photos you want to delete, the tap Delete.  You can also import camera roll photos to your computer and delete them after importing as explained in this article: http://support.apple.com/kb/HT4083.

  • I cant get my printer to print images

    Hi there.
    I have a MacBook Air. Running Mac OS X 10.6.8(Snow Leopard Ithink).
    I am trying to connect it to an HP Laserjet 2840. BUT when Iprint on the correct printer drivers I get a page printed that looks like this:
    “ERROR: limitcheck
    OFFENDING COMMAND: image
    STACK:
    (true)
    -mark-“
    If however I set the printer driver to generic plc laserprinter I can get black and white images.
    I have tried googling and find that most people with thisproblem have sizing issues on their printer, or are trying to send images thatare too complicated to the printer. I am unable to print even a 17kb .jpg atthis point.
    I have tried installing the latest drivers, or reverting topanther drivers, and then installing the printer and updating but am stillgetting the same issue.
    Any help would be much appreciated as its actually my bosseslaptop and she is getting annoyed that she has to email me to print everytime!!!
    Thanks in advance!!

    hi there,
    could you provide the community with a little more information to help narrow troubleshooting? Things like your printer model and your operating system help out a lot.
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Open and display image in MVC layout

    Hello!
    I cant figure out how I shall do this in an MVC layout:
    The program request user to open an image file that are then displayed in a JLabel
    My setup at the moment resolve in a nullpointerexeption because it dont get any actual image file, but I dont understand what I have missed.
    I can not post the whole code fo you to run because it is to big, so I post the part that are the most important. please have a look.
    PicturePanel
    //Import Java library
    import javax.swing.*;
    import java.awt.*;
    public class PicturePanel extends JPanel {
         //Variables
         private ImageIcon picture;
         //Method to get information of the selected file
         PicturePanel (String fileName) {
              picture = new ImageIcon (fileName); //Get the filename
              int w = picture.getIconWidth(); //Get the image with
              int h = picture.getIconHeight(); //Get the image height
              //Set preferable size for the image (Use the properties for the selected image)
              setPreferredSize(new Dimension(w, h));
              setMinimumSize(new Dimension(w, h));
              setMaximumSize(new Dimension(w, h));
         //Method to draw the selected image
         protected void paintComponent(Graphics g) {
              super.paintComponent(g); //We invoke super in order to: Paint the background, do custom painting.
              g.drawImage(picture.getImage(), 0, 0, this); //Draw the image at its natural state
    }From my model:
    //Local attributes
         boolean check = false; //Used to see if a statement is true or not
         PicturePanel pp;
         JFileChooser fc;
         int returnVal;
    //newFile in File menu
         public void newFile() {
              //Open a file dialog in users home catalog
              fc = new JFileChooser();
              //In response to a button click:
              returnVal = fc.showOpenDialog(pp);
              System.out.println("You pressed new in file menu");
         }From my controler:
    //User press "New" in File menu
              else if (user_action.equals("New")) {
                   //Call method in model class
                   model.newFile();
                   //Update changes
                   if (model.returnVal == JFileChooser.APPROVE_OPTION) {
                        System.out.println("Hello1");
                        File f = model.fc.getSelectedFile();
                        if (model.pp != null)     
                             model.pp = new PicturePanel(f.getAbsolutePath());
                        System.out.println("Hello2");
                        //Display image (Here is line 83)
                        view.setImage_DisplayArea(model.pp);
                        System.out.println("Hello3");
              }From my view:
    //Sets the image to be displayed on the image_display area (Here is line 302)
         public void setImage_DisplayArea(PicturePanel pp) {
              image_display.add(pp);
         }The complet error:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at java.awt.Container.addImpl(Container.java:1015)You pressed new in file menu
    Hello1
    Hello2
         at java.awt.Container.add(Container.java:351)
         at View_Inlupp2.setImage_DisplayArea(View_Inlupp2.java:302)
         at Control_Inlupp2.actionPerformed(Control_Inlupp2.java:83)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:334)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1050)
         at apple.laf.CUIAquaMenuItem.doClick(CUIAquaMenuItem.java:119)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1091)
         at java.awt.Component.processMouseEvent(Component.java:5602)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3129)
         at java.awt.Component.processEvent(Component.java:5367)
         at java.awt.Container.processEvent(Container.java:2010)
         at java.awt.Component.dispatchEventImpl(Component.java:4068)
         at java.awt.Container.dispatchEventImpl(Container.java:2068)
         at java.awt.Component.dispatchEvent(Component.java:3903)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
         at java.awt.Container.dispatchEventImpl(Container.java:2054)
         at java.awt.Window.dispatchEventImpl(Window.java:1801)
         at java.awt.Component.dispatchEvent(Component.java:3903)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)Edited by: onslow77 on Dec 16, 2009 5:00 PM
    Edited by: onslow77 on Dec 16, 2009 5:04 PM

    Hello again!
    Anyone that can help me figure out how to implement this in an MVC layout, I feel stuck.
    I post a little program that open and display an image file so that you better can understand what I whant to do.
    ShowImage
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.File;
    import javax.swing.filechooser.*;
    public class ShowImage extends JFrame{
         //Variables
         JFileChooser fc = new JFileChooser();
         PicturePanel pp = null;
         ShowImage () {
              super("Show"); //Title
              //Create the GUI
              JPanel top = new JPanel();
              add(top, BorderLayout.NORTH);
              JButton openBtn = new JButton("Open");
              top.add(openBtn);
              openBtn.addActionListener(new Listner());
              //Settings for the GUI
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              pack();
              setVisible(true);
         class Listner implements ActionListener {
              public void actionPerformed(ActionEvent ave) {
                   int answer = fc.showOpenDialog(ShowImage.this);
                   if (answer == JFileChooser.APPROVE_OPTION){
                        File f = fc.getSelectedFile();
                        //Check
                        System.out.println(f);
                        System.out.println(pp);
                        if (pp != null)
                             remove(pp); //Clean so that we can open another image
                        //Check
                        System.out.println(pp);
                        //Set the PicturePanel
                        pp = new PicturePanel(f.getAbsolutePath());
                        //Check
                        System.out.println(pp);
                        //Add PicturePanel to frame
                        add(pp, BorderLayout.CENTER);
                        validate();
                        pack();
                        repaint();
         //Main
         public static void main(String[] args) {
              new ShowImage();
    }PicturePanel
    //Import Java library
    import javax.swing.*;
    import java.awt.*;
    public class PicturePanel extends JPanel {
         //Variables
         private ImageIcon picture;
         //Method to get information of the selected file
         PicturePanel (String fileName) {
              picture = new ImageIcon (fileName); //Get the filename
              int w = picture.getIconWidth(); //Get the image with
              int h = picture.getIconHeight(); //Get the image height
              //Set preferable size for the image (Use the properties for the selected image)
              setPreferredSize(new Dimension(w, h));
              setMinimumSize(new Dimension(w, h));
              setMaximumSize(new Dimension(w, h));
         //Method to draw the selected image
         protected void paintComponent(Graphics g) {
              super.paintComponent(g); //We invoke super in order to: Paint the background, do custom painting.
              g.drawImage(picture.getImage(), 0, 0, this); //Draw the image at its natural state
    }//The endEdited by: onslow77 on Dec 16, 2009 7:30 PM

Maybe you are looking for

  • GRWR value is not capturing calue

    Hi My client"s business requirement is that after creation of Stock transfer order PO(Document type UB) they do the outbound delivery and after that proforma invoice.Now in STO PO PI01 lets say  taking 150 and GRWR which is 100% taking 150 as well it

  • Is there a shortcut to adjust brightness on dual LED display?

    i have a 24" LED display hooked up to a macbook pro. the F1 and 2 keys adjust the brightness on my laptop display, which is dandy, and i can open the display preferences and adjust the slider for brightness on the LED display, but i'd love a keyboard

  • How can I individually align various columns in a text frame?

    I've searched and searched but I cannot find anyone who has asked this, perhaps it isn't possible? I have a Circle, and within it, I have 6 text columns. I basically want to align the left most column to the left, the rightmost to the right, and the

  • DBMS_SPACE_ADMIN ASSM

    Hi, Does anyone know to simulate the type of corruption or inconsistency in an ASSM tablespace or segment that would be highlighted by the following procedures? DBMS_SPACE_ADMIN.ASSM_TABLEPSACE_VERIFY DBMS_SPACE_ADMIN.ASSM_SEGMENT_VERIFY I'd like to

  • Any way to change default treatment of placed graphics?

    Every time I insert a graphic into an iWeb page, the default is for it to have a 6-point line stroke around it. I don't want this stupid stroke and must manually change that setting. Is there some way to tweak iWeb's default so that it doesn't apply