JApplet's init, start and run

I'm new to JApplets. My question is, does an applet need to have init, start and run methods? If it dosn't, does it essentially require any one of these three? What's the basic function of each anyways??
thanks a lot up front

To have a applet to work you need the init() method
the run and start methods are normally if you are useing
a thread
pa hopes this helped

Similar Messages

  • When I download itunes, it says that Ipod Service failed to start. I checked the services under task manager and when I try to start it, it says access denied. How to I get access and for the ipod service to start and run?

    Please help. My ipod classic could not be recognised by itunes when I connect my ipod to PC. Previously it has been recognised before I updated. This was a while ago now and so I removed all apple files and re installed the latest itunes but am having the same problem.
    When I download itunes, it says that Ipod Service failed to start. I checked the services under task manager and when I try to start it, it says access denied. How to I get access and for the ipod service to start and run?

    Some anti-virus programs (e.g., McAfee) have this rule that can be invoked under the "maximum protection" settings: PREVENT PROGRAMS REGISTERING AS A SERVICE. If that rule is set to BLOCK, then any attempt to install or upgrade iTunes will fail with an "iPod service failed to start" message.
    If you are getting this problem with iTunes, check to see if your anti-virus has this setting and unset it, at least for as long as the iTunes install requires. Exactly how to find the rule and turn it on and off will vary, depending upon your anti-malware software. However, if your anti-virus or anti-malware software produces a log of its activities, examining the log may help you find the problem.
    For example, here's the log entry for McAfee:
    9/23/2009 3:18:45 PM Blocked by Access Protection rule NT AUTHORITY\SYSTEM C:\WINDOWS\system32\services.exe \REGISTRY\MACHINE\SYSTEM\ControlSet001\Services\iPod Service Common Maximum Protection:Prevent programs registering as a service Action blocked : Create
    Note that the log says "Common Maximum Protection: Prevent programs registering as a service". The "Common Maximum Protection" is the location of the rule, "Prevent programs registering as a service" is the rule. I used that information to track down the location in the McAfee VirusScan Console where I could turn the rule off.
    After I made the change, iTunes installed without complaint.

  • When PC System timing hits 0000hrs Loops back to start and runs again using Loop function?

    When PC System timing hits 0000hrs Loops back to start and runs again using Loop function?

    It's all described in the help for it. Vista version:
    Attachments:
    Task Scheduler.png ‏61 KB

  • JApplet / application init / start progress status feedback

    We used to put up a separate JFrame during the initization/startup of our applets/applications for status messages. While o.k. for Java Webstart / application modes (& maybe standalone applet mode), this was not pretty for customers embedding our apps in portals.
    So, the goal became to show custom progress/status on the "gray screen" initial applet contentpane until our app desktop is ready to show. Known threading / painting issues during applet startup made this task somewhat non-trival.
    Searched around here on the jdc & found a nice little Moving Ball class & used that as a base for the play app below. Thought I'd post this back to jdc in case anyone else finds it useful. The JApplet code has a main, so same code should work for the app whether deployed as a (plug-in) applet, application JAR or Web Start app.
    The code should show a RED moving ball during init, a YELLOW one during start and a GREEN one after start method is done (w/ball x position update in scrolling pane)....
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.WindowListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
        cforster: Uses Ball painting code (from jdc) & separate status area to simulate JApplet
        startup msgs to be shown to user during applet init...
        Point is to show status during applet/application initialization (init / start) methods...
        Can JAR this up & try in appletviewer or using 1.4.2+ plugin, etc.
        With main() also usable in application / Webstart mode....
        If going the application route (or double-click JAR route), need JAR manifest.mf like:
        Manifest-Version: 1.0
        Main-Class: Today
        Created-By: 1.4.2 (Sun Microsystems Inc.)
    public class Today extends JApplet {
        private static Today inst;
        //  Ball color will change from RED (init) -> YELLOW (start) -> RED (start done)
        Color ballColor = Color.RED;
        final int colorSleep = 3000;    // Time to waste in init & start methods
        final int pauseSleep = 25;      // Time between Ball moves/draws
        JTextArea jta = new JTextArea("===  Status  ===" + "\n", 50, 132);
        MovingBall movingBall = new MovingBall(jta);
        public static Today getInstance() {
            if (inst == null) inst = new Today();
            return inst;
        public Today() {
            super();
        public void init() {
            setVisible(true);
            getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
            movingBall.setPreferredSize(new Dimension(400, 100));
            movingBall.setBackground(Color.lightGray);
            getContentPane().add(movingBall);
            jta.setEditable(false);
            jta.setBackground(Color.lightGray);
            getContentPane().add(new JScrollPane(jta));
            movingBall.start();
            validate();
            try {
                Thread.sleep(colorSleep);
            catch (InterruptedException ie) {      }
        public void start() {
            ballColor = Color.YELLOW;
            validate();
            try {
                Thread.sleep(colorSleep);
            catch (InterruptedException ie) {       }
            ballColor = Color.GREEN;
        public void stop() {
            movingBall.stop();
        public static void main(String args[]) {
            final Today CallingApplet = Today.getInstance();
            JFrame frame = new JFrame("Moving Ball / Load status");
            frame.getContentPane().setLayout(new BorderLayout());
            frame.getContentPane().add("Center", CallingApplet);
            // Use an adapter to close the window
            WindowListener listener = new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    System.exit(0);
            frame.addWindowListener(listener);
            frame.setBackground(Color.lightGray);
            frame.pack();
            frame.setSize(400, 400);
            frame.show();
            CallingApplet.init();
            CallingApplet.start();
        class MovingBall extends JPanel implements Runnable {
            final int xPos_Start = 8;
            int xPos = xPos_Start, yPos = 100, rad = 10;
            boolean moveForward = true;
            Thread thread;
            Graphics dbg;
            Image dblImage;
            JTextArea jta = null;
            MovingBall ball = this;
            // Takes in JTestArea that is supposed to be the status msg area...
            // In practice, the staus area & updates are elsewhere...
            public MovingBall(JTextArea jta) {
                this.jta = jta;
            public void start() {
                Thread ballThread = new Thread(this);
                ballThread.start();
            public void run() {
                Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
                yPos = getHeight() / 2 + (rad / 2) + rad;
                while (true) {
                    if (moveForward)
                        xPos++;
                    else
                        xPos--;
                    if (xPos > getWidth() - (2 * rad))
                        moveForward = false;
                    else if (xPos < xPos_Start + (2 * rad)) moveForward = true;
                    SwingUtilities.invokeLater(new Runnable() {
                        public void run() {
                            if (xPos % 20 == 0) {
                                jta.append("xPos = " + xPos + "\n");
                                jta.setCaretPosition(jta.getText().length());
                            ball.paintImmediately(ball.getBounds());
                    try {
                        Thread.sleep(pauseSleep);
                    catch (InterruptedException ie) {
                        break;
            public synchronized void stop() {
                thread = null;
    /*  Not needed for Swing Component (only AWT ?)
              public void update(Graphics g)
                   if(dblImage == null)
                        dblImage = createImage(this.getSize().width, this.getSize().height);
                        dbg = dblImage.getGraphics();
                   dbg.setColor(getBackground());
                   dbg.fillRect(0, 0, this.getSize().width, this.getSize().height);
                   dbg.setColor(getForeground());
                   paintComponent(dbg);
                   g.drawImage(dblImage, 0, 0, this);
            public void paintComponent(Graphics g) {
                g.setColor(getBackground());
                g.fillRect(0, 0, getWidth(), getHeight());
                g.setColor(ballColor);
                g.fillOval(xPos - rad, yPos - rad, 2 * rad, 2 * rad);
    }If anyone plays with this & finds issues/problems or makes improvements to its mechanism, would be nice to post back to this thread.

    hello,
    I found that while configuration of AM there was an warning
    Command deploy executed successfully with following warning messages: Error occurred during application loading phase. The application will not run properly. Please fix your application and redeploy.
    WARNING: com.sun.enterprise.deployment.backend.IASDeploymentException: ContainerBase.addChild: start: LifecycleException:  java.lang.NoClassDefFoundError
    Successfully deployed /amserverthis might help in resolving the issue.
    regards,
    sumant

  • What is the difference between start() and run()

    Hi:
    what is the difference between start() and the run()???
    in my app, i have
    Console.debug( "starting thread to listen for clients" );
    _server = new Server( this );
    _server.start();
    _server extends Thread..
    why everytime i use server.start(); my app will terminate on it is own, even though in my servr.run() method, i have a while loop
    and if i call _server.run() explicitly in my code, that while loop will be in execution
    can someone let me know??
    thnx

    what is the difference between start() and the
    run()???start() is a method on Thread that tells it to start.
    run() is a method in the object that the thread executes.
    why everytime i use _server.start(); my app will
    terminate on it is own, Err.... I'm not convinced this is true. It'll throw an IllegalThreadStateException, if you try to restart an existing thread.
    If that's what you're saying.
    even though in my _servr.run()
    method, i have a while loopI don't see the connection. Are you saying that the while loop never terminates, and you don't see why the thread is terminating?
    and if i call _server.run() explicitly in my code,
    that while loop will be in executionIf you call server.run() explicitly, then run() will be executed in the same thread that you called it in.

  • How to start and run osgi.jar and bundles into it programmatically

    I want to launch and run osgi.jar programmatically(at runtime) from a simple java program.
    Then load and run a osgi bundle into the osgi framework from the same program
    Could anyone help me in this regard
    thanks in advance

    I want to launch and run osgi.jar programmatically(at
    runtime) from a simple java program. I have no idea what osgi.jar is... if you want to execute it, find the main-class and simply call its main() method.
    Then load and run a osgi bundle into the osgi
    framework from the same program No idea what you're talking about. Read the documentation or call their support.

  • External FW System drives. 10.4.11 starts and runs. 10.5.8 won't

    Hello, and thanks in advance for your time. I've never posted in this forum, but am a regular contributor on the Logic Pro forum.
    I've had TIger running on my G5 off an external boot drive to use Logic Pro 8 trouble free for a long time. I cloned the drive, made sure the clone booted and updated the clone to 10.5.8 so I could run Logic 9. This worked great for about 4 months. One day Logic crashed during a routine operation that I use daily without incident. The computer froze. I could not force quit out of Logic. When I went to the hidden dock, it opened but did not function or close again. I shut down with the power switch. I could not get OS 10.5.8 to start up again. It will still startup fine in 10.4.11 on the original external drive that I cloned.
    I have tried:
    Running disk utility to check the drive. It passes.
    Launching from the install disk and repairing permissions on the 10.5.8 drive. It repairs them and finds no issues when re-checked.
    Launching the install disk and restoring the startup from time machine.
    Re-installing 10.5 on the same drive as the update.
    Re-cloning and re-updating to a different external drive.
    Swapping cables and firewire ports.
    Re-formatting and doing a fresh install of 10.5 on another drive.
    Zapped the PRAM.
    Started in safe mode and reset the password.
    And more stuff that I can't recall at the moment but will remember if anyone suggests a possible solution that I have already tried.
    Through all this, I can still start up off the 10.4.11 drive on the same firewire ports.
    I also took the 10.5.8 hard drives home and was able to boot my old mdd G4 off of each of them with no problem.
    I am quite stumped as to why the same FW buss can boot up in Tiger, but not in Leopard, especially since it worked fine at first.
    Any Suggestions?

    The good news is that I've gotten to the source of the
    problem. It got to the point where I could not boot in Tiger either.
    This happened after accessing the second internal drive in the G5. I
    opened the box, disconnected the drive and all is well. Leopard works,
    Logic 9 works, the order of the universe is restored.....
    The bad news is that because the first symptom of this problem was the
    loss of Leopard and Time Machine, the most recent back-up I have of my
    Logic songs that I save on this drive is from 9/24/10. If I can't get
    at these files I'll be re-doing many hours of work. The drive
    partitions mount OK. I can navigate through the first 2 levels of
    folders but cannot display the contents of the 3rd level. Finder
    freezes when I try. I've rebuilt the directories with Disk Warrior
    with no benefit.
    Do you have any tips on file recovery? I was thinking I'd start with
    putting the drive in an external enclosure to eliminate the G5's
    internal wiring as a possibility. Beyond that, I'm clueless. Any leads
    would be very much appreciated.

  • Problems starting and running corecenter

    Hi!
    I installed the new corecenter53.exe on a fresh Windows XP Professional SP1.
    I rebooted, Corecenter.exe starts automatically. I can see, that the program is running in Task Manager, but I can't access it. It runs in the background with 50% CPU Usage.
    I have a MSI 865PE FISR2 Mainboard with a 2,4 C Pentium 4.
    I uninstalled and reistalled Corecenter.exe and tried to remove it from autostart and started it manually, but that didn't help.
    Any Ideas?

    If your problem is to access the main program try browsing:
    C:\Program Files\MSI\Core Center\CoreCenter.exe
    That should do it. Unless the installation is corrupt somehow. You didn't do any WindowsUpdates after installing CoreCenter did you?

  • Merge catalog function process starts and runs but does not complete

    I am trying to merge my laptop catalog with my desktop catalog. Both machines are LR5.4 and OSX 10.9.3.
    I am following the documented LR process. The merge starts, runs and looks like it completes but the new data (photos and catalog information) does not show up in desktop (merged) catalog.
    When I try it again, the dialog box indicates that the new files have been exported (as they are no longer highlighted).
    I can not locate any files (by name) on the desktop that have moved from the laptop.
    What do I do next?

    Hello Katephone,
    Thank you for visiting Apple Support Communities.
    If your iPhone won't complete the backup to iTunes, check out this article, 
    iOS: If you can't back up or restore from a backup in iTunes
    Note it also links to another troubleshooting article:
    Apple software on Windows: May see performance issues and blank iTunes Store
    Please check them out.
    Best Regards,
    Nubz

  • Help please! Imac won't start and running out of ideas

    Help! My imac G4 Flat Panel running tiger won't boot or go beyond the grey screen, here's what happened,
    I went away on holiday for ten days and unplugged it, on return it worked fine for the first few goes however after leaving it with alot of photos open for a couple of hours I returned and the screen had gone funny, showed the app window on top but not properly and grey on the bottom two thirds, I could just about move the mouse which was ghosting and it sort of worked but not properly, I switched it off on the power switch and rebooted and it was okay for a few more sessions until getting stuck with the mail app open, I tried to force quit but couldn't and eventually turned it off on the switch, after which it won't boot or go beyond the grey screen every time I switch it on, I've tried all the following with no joy:
    -unplugged all peripherals
    -taken out airport card and extra ram I'd fitted myself about six months ago
    - done command, option, p and r on switching on, also command x and command option.
    - tried to boot from the original os x cd which came with it - this gives me a broken mac symbol and multicoloured spinning ball
    - boot from os9 disk which came with it this gives me a flashing question mark sometimes but most times just the grey screen.
    - boot from apple hardware test diagnostic cd which came with it, just says loading and hangs
    - boot from tiger dvd - shows the apple logo then a sign similar to no entry sign and spinning thing underneath.
    I've tried rebooting about 100 times now, as it once did a similar thing about eight months ago but eventually booted okay and then I ran check permissions etc. and never had a problem until now.
    I've put everything I can think of in in case any of it is important, apologies if there's too much extra info here but if anyone has any ideas I'd be very grateful, am a bit stuck without it, luckily I've backed up most of my stuff but there's some things I haven't. please help! thanks

    Sorry to hear about your problem and I wish I had happy news. Sounds like what I am going through. Just spent over 200$ getting the Tiger upgrade installed at a Mac repair place because I wanted it done right, and had the RAM upgraded. After two weeks of bliss I get a gray screen with a spinning gear. The CD drawer wont open, nothing. Take it back to the shop and I find my hard drive is done. This is the SECOND hard drive. My G-4 came with a 40 gig HD, the one that they replaced it with 2 years ago was an 80 gig. I hope thats not whats going on with yours but it sure sounds like it. I beginning to wonder if there isn't a design issue going on here. I am a casual computer user but my son is on it for hours at a time and I'm wondering about heat buildup and the hard drive. Gonna ask that question when I pick it up, good luck with yours.
    Pat

  • ICal starts and runs really slow

    I have a prblem with iCal working really slow. It takes almost a minute to start up and every added or modified event just ... mrrr ... it is so slow. What can I do ? I have the latest version of iCal on brand new Powerbook 12" on macOS X 10.4.3

    This appears to be a general problem likely related to the change in the way Tiger handles iCal files. Because of Spotlight, each item has to be an individual file in order to be searchable. I think this puts a huge burden on iCal for those of us with lots of calendar items.
    If you create a new user and then create an iCal calendar, is it still slow? It is not for me, which means it has something to do with my main user account, which has events going back to 1996.
    Here is a thread with some fixes (delete preferences, reimport data, etc), but none seem to work for me. Your mileage may vary.
    http://discussions.apple.com/thread.jspa?messageID=1029801&#1029801

  • After updating Firefox, it wants to start in safe mode, when you click reset & restart it starts and runs fine, how do I make it stop opening in safe mode?

    I recently updated my Firefox to 3.5.9 for Google pack, after doing so Firefox would only open in safe mode. So I started in safe mode that one time. Everafter, when starting firefox it always opens a dialog window about safe mode, I click the option to reset the toolbars and restart, and it starts normally. I'd like to make it stop opening with this dialog, and just open normally without asking about safe mode.
    == This happened ==
    Every time Firefox opened
    == I updated Firefox

    See: http://support.mozilla.com/en-US/kb/Firefox+is+stuck+in+Safe+Mode
    Your Firefox 3.5.9 is 2 versions behind. The current version is Firefox 3.5.11 which includes several security updates. In addition, support and updates for the Firefox 3.5.x series is planned to end in August 2010. Consider upgrading to the latest version Firefox 3.6.8:
    Download Firefox 3.6.8 here: http://www.mozilla.com/en-US/firefox/all.html
    See:
    http://support.mozilla.com/en-US/kb/Installing+Firefox
    http://support.mozilla.com/en-US/kb/Updating+Firefox

  • Can't find the proper sdk exe to start and run the SDK along with classes

    Hello:
    I have downloaded the java sdk development, several versions of it. However, I cannot find not one proper exe file that will open the sdk development interfaces. I have searched my computer and it does seem that I have all the files such as bin, ect... , even some sample classes, except for the main sdk exe that will open the java classes. So, I need some help with this issue, which would be greatly appreciated.
    Recency

    The SDK is not one single executable. And to "open java classes" doesn't really mean anything.
    You'll want to start here:
    http://download.oracle.com/javase/tutorial/getStarted/cupojava/index.html
    Perhaps by "executing the JDK", you're talking about an IDE? If so, the NetBeans link on that page is what you're looking for. However, I strongly advise you to avoid IDEs and do things with a simple programmer's editor and command line until you a) have a good grasp of the language basics, and b) are clear on the concepts of language, IDE, JDK, and core API, and what separates one from the others.

  • I use elements 9 all of a sudden now when I open Organizer the updater starts and runs for 20-40 min

    how can I fix this? Can I reload the software without losing my files created? HELP   Thank you

    how can I fix this? Can I reload the software without losing my files created? HELP   Thank you

  • Computer freezes 9/10 times on start up, running slow, and a lot of error messages

    Hi guys,
    Im new tot his site, but am trying to find someone that can help resolvemy computer issues.
    it started off running really slow and freezing during programs, and then i started getting error messages every time ibooted the computer, and now 9 out of 10 times i try to bootup orrestartthe computer will freeze and just shows a black screen. only 
    computer is a HP pavilion tx2000 (notebook)
    i have used a forum website called spyware ware warrior to try and resolve the issues, which they help check for malware but were unable to resolve what is wrong...
    i would apreciate any help you can give. 
    cheers

    Hi Steve,
    I think the most likely answer to solve this problem would be to reinstall the operating system using your Recovery Discs ( not the Recovery Partition on the Hard Drive ) as there are probably corrupt Windows files caused by the malware infection that the system file check cannot detect or repair.
    I realise reinstalling the OS can be a pain, so you may want to try the following first.
    Start the notebook and let Windows fully load.  Hold down the Windows key and press R.  In to the Run box type msconfig and hit enter.  In the following window, click the Start up tab, remove the tick next to each start up item and then click Apply to make the change.  Reboot the notebook and see if it now starts and runs normally.  If it does, re-enable one start up item at a time, click Apply and reboot to check if it still runs ok.  Keep doing this until you encounter the problem again and you will know the last program you set to start is causing the issue.
    If the above process doesn't help, the best option left would be to reinstall the OS - Make sure to backup all your personal files etc first.  If you don't have your Recovery Discs, you can order a replacement set of using the link below - these are around $30 in the US.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00810334&cc=us&lc=en&dlc=en
    If you have any problem with this link, order them directly from HP.
    If you live in the US, contact HP Here.
    If you are in another part of the world, start Here.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

Maybe you are looking for

  • I can't view youtube videos on my ipod touch (just updated it to iOS6)

    I was having trouble viewing youtube vids on my ipod touch, thought it may be a problem since i hadn't updated, but i tried updating to iOS6, and installed the new youtube app, but it still won't work. i also tried going through safari, but it still

  • Copying Function Modules

    Hi there, newbie ABAP er here, I want to reset the SENDER value in FM SO_NEW_DOCUMENT_ATT_SEND_API1 from SPACE to a valid non-reply email address. Obviously I dont want to alter the Function module so I made a Z copy in my ZDEV package -> Function gr

  • New iPad (3rd Gen) crashes ALL THE TIME

    So I have been using my new iPad this weekend, and it crashes all the time - the specific programs.  I cannot access simple things like in iBooks and other programs without a crash.  I dont know what to do other than to return it.  I sold my iPad 2 a

  • Replica Active Directory server in windows server 2008 R2

    I installed and configured a secondary active directory server in 2008 R2 for fault tolerance as well as backup active directory server what i wanted to know is if  my primary AD goes down??? what changes i need to do my users pc since they are  usin

  • Connecting speakers with dell notebook

    i am considering buying speakers with my dell notebook and i was wondering if all i-trigue systems and the inspire t7900 will connect with it without having to buy additional adaptors.will these speakers also connect with my zen touch. any help will