Need help with an applet that will only run as an application

I am working on a slide show applet. The problem is that is won't run as an applet. I added a quite standard main method to stick the applet in a JFrame and this worked. I believe that the problem lies in how I am trying to open the files.
here are two of the methods that I believe contain part of the problem
     private void showImage( String image_name )
          image_file = Toolkit.getDefaultToolkit().getImage( image_name );
          display_image.loadImage( image_file );
          repaint();
     private void setFileFolder( String folder )
          file_finder = new File( folder );
          file_results = file_finder.list();
     }image_file is an object of class Image, display_image is an object of class ImageComponent (extends JComponent to draw an image), and file_finder and file_results are both objects of class File
I would greatly appreciate it if some one would help me with this.
The full source can be found at http://www.geocities.com/enchantedforest/3688/ImSP.zip

Ok. I got the image loading to work.
Now how do I fix the second method shown in my first post? It is needed to find all of the images in one specific folder so that the slide show can run.

Similar Messages

  • Need help with a workflow that will restrict resize to 720x540

    I need help constructing a workflow that will resize any image I choose to 720x540. I want this to be restrictive to this size, in other words I don't want 720x468 or etc. I have tried this too many times, will no success so now I am reaching out for help. HELP. Once I have correct resized an image as needed I want to change its format and save a copy.
    As always thanks for your reading and replying to my Post,
    Sebastian

    Hi there,
    what Image editing software do you have, if any ?
    regards
    Ric

  • Need help with WMI code that will send output to db

    'm new to WMI code writing, so I need some help with writing code that we can store on our server. I want this code to run when a user logs into their computer
    and talks to our server. I also want the code to:
    * check the users computer and find all installed patches
    * the date the patches were installed
    * the serial number of the users computer
    * the computer name, os version, last boot up time, and mac address
    and then have all this output to a database file. At the command prompt I've tried:
    wmic qfe get description, hotfixid
    This does return the patch information I'm looking for, but how do I combine that line of code with:
    wmic os get version, csname, serialnumber, lastbootuptime
    and
    wmic nicconfig get macaddress
    and then get all this to output to a database file?

    Thank you for the links. I checked out http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx and
    found lots of good information. I also found a good command that will print information to a text file.
    Basically what I'm trying to do is retrieve a list of all installed updates (Windows updates and 3rd party updates). I do like that the below code because it gives me the KB numbers for the Windows updates. I need this information so my IT co-workers &
    I can keep track of which of our user computers need a patch/update installed and preferably which patch/update. The minimum we want to know is which patches / updates have been installed on which computer. If you wondering why we don't have Windows automatic
    updates enable, that's because we are not allowed to.   
    This is my code so far. 
    #if you want the computer name, use this command
    get-content env:computername
    $computer = get-content env:computername
    #list of installed patches
    Get-Hotfix -ComputerName $computer#create a text file listing this information
    Get-Hotfix > 'C:\users\little e\Documents\WMI help\PowerShell\printOutPatchList.txt'
    I know you don't want to tell me the code that will print this out to a database (regardless if it's Access or SQL), and that's find. But maybe you can tell me this. Is it possible to have the results of this sent to a database file or do I need to go into
    SQL and write code for SQL to go out and grab the data from an Excel file or txt file? If I'm understanding this stuff so far, then I suspect that it can be done both ways, but the code needs to be written correctly for this to happen. If it's true, then which
    way is best (code in PowerShell to send information to SQL or SQL go get the information from the text file or Excel file)?

  • I have a on line office manager that will only run with windows 7 or vista, how can I run it on my iMac?

    I have an online office manager that will only run with windwos 7 or Vista, how can I run it on iMac?

    If they don't have a Mac version and you must have it, you'll have to install Windows in Boot Camp or similar app.

  • Need help with advanced applet

    I need help with designing an applet as follows. Can someone give me a basic layout of code and material so i can fill in the rest or at leats give me some hints so i can get started since i am like no good at applets.
    Design and implement an applet that graphically displays the processing
    of a selection sort. Use bars of various heights to represent
    the values being sorted. Display the set of bars after each swap. Put
    a delay in the processing of the sort to give the human observer a
    chance to see how the order of the values changes.
    heres a website that does something similar
    http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html

    elasolova wrote:
    i will not help you this time. but if you buy me a candy maybe i can reconsider the issue. :PI suggest an all-day sucker.

  • Plz help with deploying applet that uses SSL

    Hi, maybe this is not the adecuate forum but ive already tried in others and i got no answer.
    Im trying to use a certificate with my applet ( tha sends a lot of info to the server and also connects to another hibernate db) but im getting this error:
    Server side:
    username is: Panda
    Registered the SSLServerSocket on port 6969
    Listening ....
    ---- Got a connection from a client
         this is an unknown client
    !!!!!!Error in reading or writing from/to the client:
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
         at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
         at sun.nio.cs.StreamDecoder.read(Unknown Source)
         at java.io.InputStreamReader.read(Unknown Source)
         at java.io.BufferedReader.fill(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at PaqueteServidor.Server$handleRequest.run(Server.java:130)
    Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(Unknown Source)
         at PaqueteServidor.Server.printClientCerts(Server.java:47)
         at PaqueteServidor.Server.run(Server.java:100)
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
         at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
         at sun.nio.cs.StreamDecoder.read(Unknown Source)
         at java.io.InputStreamReader.read(Unknown Source)
         at java.io.BufferedReader.fill(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at PaqueteServidor.Server$handleRequest.run(Server.java:130)
    Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(Unknown Source)
         at PaqueteServidor.Server.printClientCerts(Server.java:47)
         at PaqueteServidor.Server.run(Server.java:100)
    Client side:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:89)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
         at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
         at sun.security.validator.Validator.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown Source)
         ... 14 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
         at java.security.cert.CertPathBuilder.build(Unknown Source)
         ... 19 more
    19:40:34,444 INFO Environment:464 - Hibernate 3.0.5
    19:40:34,444 INFO Environment:477 - hibernate.properties not found
    19:40:34,444 INFO Environment:510 - using CGLIB reflection optimizer
    19:40:34,454 INFO Environment:540 - using JDK 1.4 java.sql.Timestamp handling
    19:40:34,645 INFO Configuration:1110 - configuring from resource: /bd/hibernate/hibernate.cfg.xml
    19:40:34,645 INFO Configuration:1081 - Configuration resource: /bd/hibernate/hibernate.cfg.xml
    19:40:35,045 ERROR XMLHelper:59 - Error parsing XML: /bd/hibernate/hibernate.cfg.xml(21) The content of elements must consist of well-formed character data or markup.
    19:40:35,045 ERROR Configuration:1172 - problem parsing configuration/bd/hibernate/hibernate.cfg.xml
    org.dom4j.DocumentException: Error on line 21 of document : The content of elements must consist of well-formed character data or markup. Nested exception: The content of elements must consist of well-formed character data or markup.
         at org.dom4j.io.SAXReader.read(SAXReader.java:482)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
         at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:51)
         at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Nested exception:
    org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.dom4j.io.SAXReader.read(SAXReader.java:465)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
         at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:51)
         at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    %%%% Error Creating SessionFactory %%%%
    org.hibernate.HibernateException: problem parsing configuration/bd/hibernate/hibernate.cfg.xml
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1173)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
         at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:51)
         at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: org.dom4j.DocumentException: Error on line 21 of document : The content of elements must consist of well-formed character data or markup. Nested exception: The content of elements must consist of well-formed character data or markup.
         at org.dom4j.io.SAXReader.read(SAXReader.java:482)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
         ... 6 more
    java.lang.NullPointerException
         at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:59)
         at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Plz help and thx in advance.

    I know I didn't get round to replying but no need to post it so many times.
    http://forum.java.sun.com/thread.jspa?threadID=666870
    http://forum.java.sun.com/profile.jspa?userID=543817
    http://forum.java.sun.com/thread.jspa?threadID=669965
    http://forum.java.sun.com/profile.jspa?userID=543817
    http://forum.java.sun.com/thread.jspa?threadID=669975
    http://forum.java.sun.com/thread.jspa?threadID=669973
    Could it be that the server and client need to open different keystores?
    http://forums.java.sun.com/thread.jspa?threadID=573918&messageID=3272683
    reply 7
    My example given before should work on different machines, try to export the server key and import it into the
    client keystore. Export the client key and import in the server keystore if you want the server to authenticate
    the client.
    http://forum.java.sun.com/thread.jspa?threadID=666870
    reply 4
    Check the method getSSLSocketFactory in the applet, that will open a keystore for you.

  • Need help with java applet

    Hi all,
    Am having trouble with a java applet that won't run under Mozilla, Seamonkey, and IE 6 but will run under IE 7 Beta 2. Am posting the error info below in the hope that someone can see what could be wrong as i don't want to upgrade user's to IE 7 since it's a beta and also since most of them use mozilla. thanks in advance:
    load: class com.crystaldecisions.ReportViewer.ReportViewer not found.
    java.lang.ClassNotFoundException: com.crystaldecisions.ReportViewer.ReportViewer
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    Exception in thread "Thread-5" java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletException(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception in thread "thread applet-com.crystaldecisions.ReportViewer.ReportViewer" java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletException(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    BigDaddyLoveHandles wrote:
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    That wasn't attention-grabbing enough apparantly. Let's try it again.
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}

  • Need help with digital photos that turn fuzzy in Final Cut Pro 5

    I read the whole thread on using still pictures in FCP 5 without finding a solution to the problem I am having these days. The digit pictures I am using are all around 1632 x 1232 pixels (230 dpi), they are about 43.8% after I drop them onto the timeline and I zoom in to no more than 75%. I don't know why dark colour edges in the pictures look pixelated. The picture quality (sharpness) also does not look not as good as it appears in the viewer. I tried resizing them in photoshop before bringing them onto FCP but that does not improve the picture quality. I also tried various video filters: Shift, de-interlace, but without any satisfactory result.
    Thank you in advance for any suggestions on this issue.

    It's almost to start guessing because you seem to have tried everything. But we can't tell if you applied these changes or filters properly without watching you or your output.
    My main problem is pixelated edges especially when there is a big contrast in colour. <</div>
    this could just be what you're stuck with. DV and MPEG2 are terrible codecs for hard edges. Professionally produced DVDs are carefully encoded using bigger-badder tools than you have at your disposal.
    Don't resize your images in PS, just bring them in full size and scale them locally in FCP. An image that is 1kx1k will only display about one-fourth of the image in the Canvas at full size because the Canvas only displays about 500x700 pixels.
    The scaling algorithm in FCP totally blows but it's a video app and should not be compared to PS. You do not need Photoshop scaling quality, wasted energy. What you DO need is proper motion blur for your moves, a bit of Gaussian to hide the inevitable artifacting.
    Open the manual and look up rendering options and render settings and realtime settings. The FCP5 settings offer some interesting options with meaningless descriptions.
    bogiesan

  • Which apple iPad Air should I purchase to work with SIM card that will only be needed about 4 weeks per year?

    Purchased apple ipad  air with wifi only want to switch to one that has SIM card.  Only needed for travel about 4weeks per year...understand you can swiitch SIM cards.  Which should I start with?

    The biggest issue between the 1 and 2 is that all devices eventually age out of software updates. For example the iPad 1 maxed out at iOS 5.1.1, only the Touch 5 was eligible for iOS8 and I think only iPhones 4+ could get iOS8. So eventually, if you get a 1 you may face maxing out of the iOS updates before the two.
    That said, even if your device maxes out it'll still run just fine as it is. You may just face issues with future apps....so say my iPad maxes out in December. In February a really cool game comes out and I want it... but wait, it's for the newer iOS and won't install on mine. If you're aware of the issue and accept the issue, there's no reason you can have a fully functioning older device.
    And if the 1 is more stable than the 2, even better. I've been very lucky with my iPad 2 to have it be a very stable and dependable model while later models do seem to have had issues.

  • Need help with Java applet, might need NetBeans URL

    I posted the below question. It was never answered, only I was told to post to the NetBeans help forum. Yet I don't see any such forum on this site. Can someone tell me where the NetBeans help forum is located (URL).
    Here is my original question:
    I have some Java source code from a book that I want to compile. The name of the file is HashTest.java. In order to compile and run this Java program I created a project in the NetBeans IDE named javaapplication16, and I created a class named HashTest. Once the project was created, I cut and pasted the below source code into my java file that was default created for HashTest.java.
    Now I can compile and build the project with no errors, but when I try and run it, I get a dialog box that says the following below (Ignore the [...])
    [..................Dialog Box......................................]
    Hash Test class wasn't found in JavaApplication16 project
    Select the main class:
    <No main classes found>
    [..................Dialog Box......................................]
    Does anyone know what the problem is here? Why won't the project run?
    // Here is the source code: *****************************************************************************************************
    import java.applet.*;
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.event.*;
    import java.util.*;
    public class HashTest extends Applet implements ItemListener
    // public static void main(String[] args) {
    // Hashtable to add tile images
    private Hashtable imageTable;
    // a Choice of the various tile images
    private Choice selections;
    // assume tiles will have the same width and height; this represents
    // both a tile's width and height
    private int imageSize;
    // filename description of our images
    private final String[] filenames = { "cement.gif", "dirt.gif", "grass.gif",
    "pebbles.gif", "stone.gif", "water.gif" };
    // initializes the Applet
    public void init()
    int n = filenames.length;
    // create a new Hashtable with n members
    imageTable = new Hashtable(n);
    // create the Choice
    selections = new Choice();
    // create a Panel to add our choice at the bottom of the window
    Panel p = new Panel();
    p.add(selections, BorderLayout.SOUTH);
    p.setBackground(Color.RED);
    // add the Choice to the applet and register the ItemListener
    setLayout(new BorderLayout());
    add(p, BorderLayout.SOUTH);
    selections.addItemListener(this);
    // allocate memory for the images and load 'em in
    for(int i = 0; i < n; i++)
    Image img = getImage(getCodeBase(), filenames);
    while(img.getWidth(this) < 0);
    // add the image to the Hashtable and the Choice
    imageTable.put(filenames[i], img);
    selections.add(filenames[i]);
    // set the imageSize field
    if(i == 0)
    imageSize = img.getWidth(this);
    } // init
    // tiles the currently selected tile image within the Applet
    public void paint(Graphics g)
    // cast the sent Graphics context to get a usable Graphics2D object
    Graphics2D g2d = (Graphics2D)g;
    // save the Applet's width and height
    int width = getSize().width;
    int height = getSize().height;
    // create an AffineTransform to place tile images
    AffineTransform at = new AffineTransform();
    // get the currently selected tile image
    Image currImage = (Image)imageTable.get(selections.getSelectedItem());
    // tile the image throughout the Applet
    int y = 0;
    while(y < height)
    int x = 0;
    while(x < width)
    at.setToTranslation(x, y);
    // draw the image
    g2d.drawImage(currImage, at, this);
    x += imageSize;
    y += imageSize;
    } // paint
    // called when the tile image Choice is changed
    public void itemStateChanged(ItemEvent e)
    // our drop box has changed-- redraw the scene
    repaint();
    } // HashTest

    BigDaddyLoveHandles wrote:
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    That wasn't attention-grabbing enough apparantly. Let's try it again.
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}

  • Need help with my applet. I am new to applets...Please help..please...

    Here is one method from the class:
    public void update(Graphics g) {     
              Dimension d = size();
                   int w = sky.getWidth(this);
              int h = sky.getHeight(this);
                   // If we've loaded the moving image, draw it.
              if ((w > 0) && (h > 0)) {
                   g.drawImage(sky, ((frameNumber*12) % (w+d.width))-w,
         (d.height - h), this);
                   g.drawImage(bird,x,y,this);
    Okay. The applet runs. However, when the sky moves across as the background, as soon as it shifts completely off the view, it gets all wierd and blurry. Then, when it shifts in again, it goes back to normal. It's supposed to go from left to right, start again at the left again, and then go right again...going only right...How do I stop it from getting all wierd?
    Also, the bird image gets all staticky...all I do is increment/decrement the x and y (private int variables) in the keyPressed method (with a multi-way if). I read somewhere the solution to this problem is double-buffering...which I don't understand how to implement with my images....Sky and bird are both GIFs...
    Edited by: LinksApprentice on May 17, 2008 7:49 AM

    If you don't get a great answer (or even if you do) a great resource that I suggest you read is an article entitled [How To Ask Questions The Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html] . It will tell you how to formulate your questions so that the folks here will be better able to answer them. Good luck.

  • Need help with href link that submits

    I need some help. I dynamically create HTML that displays a horizontal row of page numbers in Position 8. Although they look like page numbers to the use, are not true Apex pages, but rather "logical" pages that change the content in a single Apex physical page. The URL that gets returned from the HREF sets a variable in the page. Then I need a submit to occur so that all my "after submit" processes run, and the page re-renders. Is this even possible? I've been unsuccessful so far.
    Thanks.

    Martin,
    Two things...
    1. Be careful about "hard coding" values in a link. I don't know if you've already done this, but the link should use substitution variables as so...
    f?p=&app_id.:&app_page_id.:&app_session.::NO::P94000_LOGICAL_PAGE_NUM:2
    When the page renders each substitution variable will be replaced with the correct value.
    2. Not that it really matters, but you named your variable starting with P94000. Typically this would indicate the variable appears on page 94000. Is this the case?
    The problem with what you want to do is that it can be done so many different ways. Each way is not necessarily better than the other. Number 1 above is using a link in the traditional sense. It's a link to the same page (achieved by using app_page_id). It will not submit the page but it contains enough information to set the value of a variable and you can code off of that variable's value.
    You could use a JavaScript trick, but I wouldn't bother for this. In addition, you could use the request value over a variable value to feed off of but since you already started with the variable I'd stick with that.
    The first thing you need to do is figure out if your variables value is being set with the link... Let me know if you have more questions.
    Regards,
    Dan

  • Help with formula variable that will give me period #

    column A = $  for fiscal year period  variable  (using 0RMA_FIP,  SAP delivered variable for period)
    Column B = $ for fiscal year period  variable minus 1  (previous period)
    In Column C,  if fiscal year period entered in 0RMA_FIP was 001/YYYY  (january)  I want column C to be zero,  if not,  it will be a variance between column A & Column B.
    I think know how to do boolean logic:  (FV_Period == 1) *0 + (Column B % Column A)
    What i am having trouble with is creating FV_Period  as a replacement path formula varialbe so that it will contain the value of the period,   1 for January,  or 2 thru 12 for other months..

    While creating the Formula variable with replacement type, you need to mention the offset start and offset length.
    I believe if your Fiscal Period is displayed as 2010009 then
    offset start = 5 and offset length = 3 should give you the value 009 which is required.

  • Need help with control system that reduces a flat output signal every time a certain input exceeds given value

    I'm having difficulty setting up a closed loop control system that reduces one of my voltage outputs (connected to a high voltage system) by 30% every time a measured voltage exceeds a certain threshold value.  I'm using a USB 6229 DAQ.  I've been trying to create a waveform that looks like a DC signal, but the only waveforms that I can seem to manipulate while my VI is running are the stock waveform types.  Also, I've tried to use a formula node or conditional structure to update the output value every time the measured voltage exceeds a given value, but everything I do reinitializes the output value every time it runs or won't store the previous signal value.  I'm using LabVIEW 8.6 and don't have the PID or similar express VI's.  I've attached the mess I've got working right now.  Can anyone help?  I'm really stuck!
    Thanks! 
    Attachments:
    HiV step down.vi ‏40 KB
    output control.vi ‏100 KB

    I'm sorry it's such a mess; I'm still pretty new at this.  These are both little driver programs for a larger overall control program. 
    Output control is meant to send a flat signal to the DAQ whose value can be manipulated while the VI is running.  I have the second activated segment merely to check the values being output.  I didn't realize I attached a version with a meaningless control...I had a control where the user would put in the stating voltage (the high voltage source has a 1V-100V setting for external control).  I've attached this slightly different but equally dysfunctional version.  Ideally, I would have liked something like the analog signal generator vi to come with an input wiring for offset on the DC signal.  Most of the code was diabled because it is copied from an example; it is largely rubbish.  I initially used the DAQ Assistant, but when things weren't working out I switched to putting in each step manually to try to troubleshoot.
    As far as HiV step down is concerned, I've tried something different with a nested case structure (if that's the right terminology?), and I've attached that file.  I think this problem has been solved, but you never know!
    Attachments:
    output control slightly different.vi ‏100 KB
    HiV step down w case structures.vi ‏44 KB

  • Need help with a struct that i need to pass to a dll

    I have just received an SDK from a third party vendor.
    I need to pass a struct to a dll in order to use our measuring arm.
    Here's the definition of the struct
    struct vOpenInfo
            int                 nFuncType;       // = DLL_OPEN_CMM (or 1)
            HWND         hwnd;
            WCHAR      sSaveDir[128];
            void             (*HelpCallBack)();
    Here's the definition of the only function that I can access from the DLL
    int CmmSpecific(void *)
    From what I understand the CmmSpecific function use the pointer on the structure to know what I want to do.
    The only problem, is that I need to transform LabVIEW data onto that type of struct.
    Does anybody have an idea how can I do it?
    Thanks in advance

    Julien Tozzi wrote:
    I have just received an SDK from a third party vendor.
    I need to pass a struct to a dll in order to use our measuring arm.
    Here's the definition of the struct
    struct vOpenInfo
            int                 nFuncType;       // = DLL_OPEN_CMM (or 1)
            HWND         hwnd;
            WCHAR      sSaveDir[128];
            void             (*HelpCallBack)();
    Here's the definition of the only function that I can access from the DLL
    int CmmSpecific(void *)
    From what I understand the CmmSpecific function use the pointer on the structure to know what I want to do.
    The only problem, is that I need to transform LabVIEW data onto that type of struct.
    Does anybody have an idea how can I do it?
    The previous post is basically correct but one thing catches my eye here and that is the fourth element in the structure which is a function pointer. The LabVIEW system can't really deal with this without quite some involved programming I would not recommend anyone to try without some very good C programming knowledge.
    So if the API description doesn't tell you that it is valid to just pass in here a NULL value to disable the callback, writing a wrapper DLL that translates this into a more LabVIEW friendly interface is by far easier to do.
    Rolf Kalbermatter
    Message Edited by rolfk on 01-11-2007 10:09 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • MacBook Pro to TV via VGA to Components gives garbled image

    Hello everyone, I'm the proud owner of a new unibody MacBook Pro and so far I'm loving it. There is, however, one problem. I would really like to connect the MBP to my HD TV, which happens to be a Sony FD Trinitron WEGA. At first I bought the Apple m

  • Retention - Seperate GL Account

    Hi, A billing document (invoice) is generated following the PR-PO process. The amount to be paid to the Vendor is 90% of the invoice amount immediately and the balance amount of 10% is retention and is to be paid only after satisfactory completion of

  • Error while instantiating...help!!!!

    IAM VERY NEW TO JAVA ....PLZ TELL ME HOW TO ACESS THE STRING DEFINED IN AN ANOTHER CLASS...THNX IN ADVANCE ..THE FOLLOWING ERROR CAME WHEN I TRIED... C:\j2sdk1.4.2_08\bin>javac test3.java test3.java:9: 'class' or 'interface' expected test1 sample =ne

  • Downloading photoshop elements 11 problems.

    I am unable to download th recently purchased photoshop elements 11 program.  I have tried both options.,

  • Commit in sp  having  globle table and function with autonomus transaction

    hi gurus, 1)  i want to know if we populate a globle table in sp  then give  commit  then weather data will be present in globle table or not ..? globle table :- ON COMMIT delete  ROWS NOCACHE; 2)  in same sp if we call a function having  autonomus t