Applet Does Not Receive Parameters Nor Display Defaults

My applet will not display a Ellipse either via the default values in my java code nor via the parameters given in the HTML document. Does anyone see what I'm doing wrong here? Here are both my documents:
import java.awt.geom.*;
import javax.swing.*;
import java.awt.*;
import java.util.*;
public class CircleByParam extends javax.swing.JApplet
          private Ellipse2D.Float circle;
          private float x, y, w, h;
          private Color circlecolor;
          public void init ()
                    String xcoor = getParameter("X");
                    String ycoor = getParameter("Y");
                    String width = getParameter("W");
                    String height = getParameter("Y");
                    String fillcolor = getParameter("FillColor");
                    if (xcoor != null)
                              x = IntVerification(xcoor);
                    else
                              x = 25;
                    if (ycoor != null)
                              y = IntVerification(ycoor);
                    else
                              y = 25;
                    if (width != null)
                              w = IntVerification(width);
                    else
                              w = 25;
                    if (width != null)
                              h = IntVerification(height);
                    else
                              h = 25;
                    if (fillcolor != null)
                              circlecolor = ColorVerification(fillcolor);
                    else
                              circlecolor = Color.BLUE;
          private int IntVerification (String value)
                    int number = 5;
                    try
                              number = Integer.parseInt(value);
                    catch (NumberFormatException e)
                              this.showStatus("Bad parameter " + value);
                    return number;
          private Color ColorVerification (String value)
                    //Assigns color to BLACK by default
                    Color color = Color.BLACK;
                    try
                              color = Color.decode(value);
                    catch (NumberFormatException e)
                              this.showStatus("Bad parameter " + value);
                    return color;
          public void paint (Graphics2D screen)
                    Graphics2D screen2D = (Graphics2D)screen;
                    screen2D.setColor(circlecolor);
                    BasicStroke pen = new BasicStroke();
                    screen2D.setStroke(pen);
                    circle = new Ellipse2D.Float(x,y,w,h);
                    screen2D.fill(circle);
HTML Document:
<HTML>
     <HEAD>
          <TITLE>Java 21 Days - Day 12 Exercise 1</TITLE>
     </HEAD>
     <BODY BGCOLOR="WHITE">
     <APPLET CODE="CircleByParam.class" height = "400" width="400">
     <param name="X" value="200">
     <param name="Y" value="200">
     <param name="W" value="25">
     <param name="H" value="25">
     <param name="FillColor" value="#996633">
     This applet requires a Java-enabled browser.
     </APPLET>
     </BODY>
</HTML>

Nevermind I figured it out, needed to make sure the paint parameter was (Graphics screen) rather than (Graphics2D screen)

Similar Messages

  • Applet does not load in IE when hosted in form via SHDocVw.dll

    Hi
    I have a signed applet that usually works well in IE and Mozilla FireFox.
    It shows a popup window with the security question Yes/No/Always and works great thereafter.
    However
    We have now developed a Vb.Net application which hosts the SHDocVw.dll and now when for example I navigate to the web page within this embedded browser control from Microsoft the applet does not load and the popup window does not appear, when trying to access it via clientside scriptring it does not find the applet object.
    // this fails when called from embedded browser control
    <script>
    document.applets[0].prepareControl();
    </script>
    Please help me I would really like to get the applet to work when using this new vb.net application with the embedded browser control because it is becoming our company's standard to hos apps in this new app and not open a new instance of IE for each application.
    Thanks
    Ian Coetzer

    What does the trace say?
    To turn the full trace on (windows) you can start the java console, to be found here:
    C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
    In the advanced tab you can fill in something for runtime parameters fill in this:
    -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
    if you cannot start the java console check here:
    C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    add or change the following line:
    javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    for 1.5:
    deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    The trace is here:
    C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    Print out the full trace of the exception:
    try{...}catch(Exception e){e.printStackTrace();}
    If no trace is created my guess is that the jre is never started, try the <object tag
    instead for your applet (html page) because your browser tries to run the applet with msjvm.

  • Applet does not work after conversion

    Hi,
    A have an html page on with a use an applet. The applet is downloaded in two cab files for the internet explorer.
    The applet and the download works fine without the java plugin.
    When I convert this page to using the html converter the applet does not work
    The error is
    java.lang.ClassNotFoundException: 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)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.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 java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at oracle.forms.handler.UICommon.instantiate(Unknown Source)
         at oracle.forms.handler.UICommon.onCreate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)
         at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.startRunform(Unknown Source)
         at oracle.forms.engine.Main.createRunform(Unknown Source)
         at oracle.forms.engine.Main.start(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I think he fails on the downlad of the second cab file....
    Sombody any ideas,
    Thank
    Tom Van de Velde

    I recently moved to programming applets and this problem gave me many
    headaches. I know that the java compiler is supposed to compile with an
    appropriate version, but I suspect that there may be a few flaws in the
    system.
    Try compiling with a command like this to force a 1.1 compilation:
    "javac -target 1.1 yourfile.java"
    This enabled my applets to load in Netscape 4.6, something they wouldn't do before.
    Installing the java plugin seems to fix the problem on other browsers. This might
    be a new bug introduced by Java 1.4, since I had very few problems with
    Java 1.3...I dunno...that's speculation...

  • Applet does not load on app server when Free Design Layout

    Hi,
    I have to embed a an applet in a webpage of an web application. Before I go on to anything.. let me first tell you, I am using Netbeans 6.0
    As shown in the tuorial:
    [http://www.netbeans.org/kb/articles/tutorial-applets-40.html]
    1. I first made the "Applet" source say HelloApplet. java. After compiling and running it I get the HelloApplet.jar.
    2. I created a WebApplication and then from the properties -> packaging -> I "Add Project" HelloApplet.jar.
    3. Then I a webpage I "embeded" the applet.
    4. I run the web app and the applet gets loaded and everything is just fine.
    But before I go on I must tell you that the applet was designed in Null Layout. Now I edited the applet source once again and changed the layout to Free Design Layout*. ( this is available from Netbeans..on the HelloApplet.java .. go to the design view.. right click on the form and from the context menu you can change the layout to FreeDesign or whatever you might want).
    When I expand the "Libraries" node I see the that the library Swing Layout Extensions - swing-layout-1.0.3.jar has been added.
    When I "run" the "HelloApplet.java" file, the applet is shown in the appletviewer. No problems with that.
    But!
    When I try to Clean & Build and Run the WebApplication, the applet does not get loaded. On inspecting the java console I see the following error:
    java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(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.lang.ClassNotFoundException: org.jdesktop.layout.GroupLayout$Group
    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 java.lang.ClassLoader.loadClassInternal(Unknown Source)
    ... 10 moreIt clearly shows that the Free Design Layout has something to do with the GroupLayout which can be found by expanding the "Swing Layout Extensions - swing-layout-1.0.3.jar". Now when the HelloApplet.jar is created only the HelloApplet.class file gets included together with some other data but NOT the swing extensions. Hence when I run the web app the class file looks for the GroupLayout.class definition but can find it in the jar as its not included when the HelloApplet.jar is created.
    But with null layout there isint a problem because null layout takes the definitions from the JRE on the machine.. and so it runs without a hitch.
    My Question is : How can I run the applet with Free Design Layout? or is it possible to package the swing layout extensions in the HelloApplet.jar?<</u>
    Thanks for all your replies.
    Cheers.
    Edited by: arijit_datta on May 15, 2008 4:07 PM

    Solved.
    Here is the solution:
    [http://www.nabble.com/Applet-does-not-load-on-app-server-when-Free-Design-Layout-to17259115.html|http://www.nabble.com/Applet-does-not-load-on-app-server-when-Free-Design-Layout-to17259115.html]
    Cheers..
    Edited by: arijit_datta on May 16, 2008 7:41 AM

  • Farm Remote App 2012 R : Your system administrator does not allow the use of default credentials to log on to Work Resources

    Hi
    Here is the situation:
    I have a Farm with 3 servers W2012R2 in a Domain
    Server1                           Server 2                                  
    Server3
    RDSession Host            RDSession Host                            
    RDSession Host
    Connection Broker        Connection Broker (Passive)
    RD Web Access
    2 DNS Alias : - poc.mydomain.local (Use for the RD Web Access and points to Server1
                        -poccb.mydomain.local (Use for the Connection Broker and points to Server1)
    I have setup the Connection broker in HA with Server2 as Passive Server : DNS Round Robin poccb.mydomain.local (Server1)
    The certificate Manager has generated 2 CA certificates :
    - 1 for the RD Web Acc (poc.mydomain.local
    -1 for Connection Broker SSO and for publishing
    I have created 1 Group Policy for these 3 servers and 1 GP for my client Windows 7 SP1.
    Server GPO :
    Computer/Administrative Templates/Windows Components/Remote Desktop Services/Remote Desktop Session Host/Security
    Always prompt for password upon connection=Disabled
    Require use of specific security layer for remote (RDP) connections : SSL (TLS 1.0)
    Set client connection encryption level : High Level
    Client GPO
    Computer/Administrative Templates/System/Credentials Delegation = Allow delegating default credentials (Concatenate OS defaults with input above)
    TERMSRV/POCCB.mydomain.local
    I use no Gateway and in my collection,I have activated SSL (Like in my Server GPO)
    I have now problem with SSO.
    Connection with remote desktop client with server name = poccb.mydomain.local
    Your system administrator does not allow you the use of default credentials to log on to the remote computer poccb.mydomain.local because its identity is not fully verified
    If in my client GPO I add the physical name of the 3 servers, it works :
    TERMSRV/Server1
    TERMSRV/Server2
    TERMSRV/Server3
    Open RDP Files with server name = poccb.mydomain.local
    if my connection broker connects me on Server1 , no problem
    But If I arrive on Server2 & Server 3=
    Your system administrator does not allow the use of default credentials to log on to Work Resources
    I have searched on internet. No result for " to log on to Work Resources"
    Any idea ? Thanks for your help

    Hi,
    Thank you for posting in Windows Server Forum.
    Firstly check that, your user is using domain\username to enter the credential in the dialog box.
    Now for a try, you can edit .rdp file with notepad and just place “enablecredsspsupport:i:0” line in it, save it an launch to check whether you are facing same issue.
    As you are using windows 7 then upgrade to RDP 8.1. Also as you have already enter the FQDN name of server under “Allow delegating default credentials”. For a try please enable and configure for all the remaining settings as follow and check the result.
    Start / Run / gpedit.msc / Computer Configuration / Administrative Templates / System / Credentials Delegation, and make sure you have the following four options enabled and configured:
    Allow Delegating Default Credentials with NTLM-only Server Authentication
    Allow Delegating Default Credentials
    Allow Delegating Saved Credentials
    Allow Delegating Saved Credentials with NTLM-only Server Authentication
    Finally, open a command prompt and use “gpupdate /force” command to apply the policy directly.
    More information:
    Remote desktop credentials did not work
    Hope it helps!
    Thanks.
    Dharmesh Solanki

  • Dear Sirs,when i use the computer updating my iphone to ios 7.1,suddenly black out.The computer has no power and my iphone does not work and keep display the screen that connect to itunes. so when i connect my iphone to iTunes, it says"itunes has detected

    Dear Sirs,when i use the computer updating my iphone to ios 7.1,suddenly black out.The computer has no power and my iphone does not work and keep display the screen saying the iphone need to connect to itunes. So when i connect my iphone to iTunes, the computer says"itunes has detected an iphone in recovery mode. you must restore this iphone before it can be used with itunes"
    So my question is if I click OK(restore the iphone),will i lose all my data and whatsapp??
    Thank you for your help and time.
    Regards,
    hopeless

    If you didn't back up the phone to iCloud or iTunes (on your computer) BEFORE attempting the update, the data will be lost.

  • Applet does not start after JRE 1.5 installation

    Hi,
    When I go to my webpage where I have an applet that requires Java 1.5..the browsers are prompting for Java installation (ActiveX component install on IE or Firefox plugin for JRE installation). But once the Java install completes the applet does not start automatically. The same code used to work nicely with Java 1.4. The applet used to automatically start and run once the JRE install completed. But with JRE 1.5 it does not start. If I do a refresh on the browser it again prompts for java installation. If I open new browser window and go to the URL the applet starts. Please let me know how to get the applet to start automatically after JRE 1.5 installation.
    Thanks,
    Vijay

    We figured out the problem. the CLASSID was not the right one. Once we changed it...its working fine.
    Vijay

  • Applet does not start after Java 1.5 installation

    Hi,
    When I go to my webpage where I have an applet that requires Java 1.5..the browsers are prompting for Java installation (ActiveX component install on IE or Firefox plugin for JRE installation). But once the Java install completes the applet does not start automatically. The same code used to work nicely with Java 1.4. The applet used to automatically start and run once the JRE install completed. But with JRE 1.5 it does not start. If I do a refresh on the browser it again prompts for java installation. If open new browser window and go to the URL the applet starts. Please let me know how to get the applet to start automatically after JRE 1.5 installation.
    Thanks,
    Vijay

    We figured out the problem. the CLASSID was not the right one. Once we changed it...its working fine.
    Vijay

  • Applet does not get loaded when viewed in a browser

    Hi,
    I have an applet,which works fine when I use appletviewer to see it. But from the browser, the applet does not get loaded.
    An error appears at the bottom of the browser that load: class not found.
    Any suggestions...please..
    Thank you....
    Pooja

    If you are using Internet Explorer, you should check to see if your browser is set to use Sun's JRE that came with your download of the SDK. (If you didn't install the JRE, you need to go back and run that on your machine. You can check to see if you are using Java's runtime enviornment (JRE) in Internet Explorer by opening IE and going to Tools --> Internet Options... --> and then going to the Advanced tab. Scroll down and make sure the box next to Java Sun "use Java 2 for <applet>" is checked. If that option is not available, you need to install the JRE.
    If that doesn't help, try using the HTML converter that comes with the SDK. It'll take your current HTML page, and you can customize it to force a download and/or usage of the JRE for applet viewing if for your particular browser.
    Hope one of these helps!

  • Phone does not receive incoming calls

    Please help.  Verizon can't seem to.  My phone does not receive 90% of its incoming calls or messages.  I have been told to delete all of my messages and call logs- no use.  I have tried removing the battery and resetting the phone.  I did make sure the phone was not in "do not disturb" mood- it is not.  People who call me say that it doesn't ring, just goes straight to voice mail even though the phone is on.  Very frustrating problem as my 6 year old phone before seemed to give me better service.  I feel like a child who is only allowed to make outgoing calls!  Please help.  All suggestions are welcome.  Thank you.

    Check the Call Forwarding section. There are two options to select. One says Forward All Calls and the other says Forward Unanswered Calls. Make sure Forward All Calls is not selected. That would cause all calls to go to the number specified which may be your voicemail. To get there from the home screen click the Phone icon > push the option button (left of the trackball) > click options > click Call Forwarding.

  • My iPhone does not receive call phones

    My problem is that most of the time my iPhone does not receive phone calls. I can call, send and receive sms, mail works, wifi, everything. But most of the incoming calls are not received, therefore my iPhone is not reliable as a phone. I have updated the firmware, I have reset it several times, but nothing changed. If I make a call phone and don't switch my iPhone, the person I have call can call me back and likely I would receive the call!!??? Someone can help me to fix my problem? Thank you in advance.

    Hi,
    Try testing the iPhone without any accessories.
    This article: http://support.apple.com/kb/HT1737 provides general tips that will resolve most issues related to making and receiving calls.
    Try contacting the cellular service provider, if the issue persists after trying the tips in the article above. This article: http://support.apple.com/kb/HT1937 provides support resources for iPhone service providers.
    -Jason

  • Why my 2006 mac mini does not receive updates

    Why my Apple 2006 mac mini does not receive updates

    To see if you are ready for 10.5, read:
    https://discussions.apple.com/docs/DOC-2275
    To see if you are ready for 10.6, read:
    https://discussions.apple.com/docs/DOC-2455
    To see if you are ready for 10.7, read:
    https://discussions.apple.com/docs/DOC-2465

  • EEM applet does not support extended ping ?

    Hi does anybody know if EEM applet does not support any extended Ping in a cli action ?
    This works:
    action 1000 cli command "ping ip 10.161.255.5"
    These statements does not work ?
    action 1000 cli command "ping ip 10.161.255.5 repeat 10 source Loopback0"
    action 1000 cli command "ping vrf TESTVRF ip 10.161.255.5 repeat 20 source Loopback0"
    I  found another possibility how to achive extended ping in EEM like following
    event manager applet ping
    event none sync yes
    action 100 cli command "enable"
    action 101 cli command "ping" pattern "[ip]"
    action 102 cli command "ip" pattern "address"
    action 103 cli command "10.161.255.5" pattern "count"
    action 104 cli command "20" pattern "size"
    action 105 cli command "100" pattern "seconds"
    action 106 cli command "2" pattern "commands"
    action 107 cli command "y" pattern "interface"
    action 108 cli command "Loopback0" pattern "service"
    action 109 cli command "0" pattern "header"
    action 110 cli command "no" pattern "data"
    action 111 cli command "no" pattern "pattern"
    action 112 cli command "0xABCD" pattern "Verbose"
    action 113 cli command " " pattern "size"
    action 114 cli command "n" event manager applet ping
    bu there is also no way to specify the VRF ?
    Any Ideas ?
    Thx
    Hubert

    Hi found failure,
    extended ping needs to be executed in priviledged mode, so need to enable in advance , then it works
    thx Bruno for the hint
    Hubert

  • MS ssis service: registry setting specifying configuration file does not exist. attempting to load default configuration file. SQLIService100 - event id 274

    window 2008 R2 server ---- after installing SQL 2008 R2 then applying sp2 / sp3 I noted a warning -
    Note this server had SQL 2008 R2 uninstalled previously.
    MS ssis service: registry setting specifying configuration file does not exist. attempting to load default configuration file.
    SQLIService100 - source
    event id- 274
    user - N/A
    Task category - service control.
    Do we need to fix something and how do we fix this warning event?
    dsk

    You could search online for this warning. I was able to find http://superuser.com/questions/346264/event-log-warning-registry-setting-specifying-configuration-file-does-not-exist
    where the fix is "in your registry, go to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTS\ServiceConfigFile
    or
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\ServiceConfigFile
    if value is empty then add in:
    C:\Program Files\Microsoft SQL Server\100\DTS\Binn\MsDtsSrvr.ini.xml"
    Arthur
    MyBlog
    Twitter

  • Outlook 2010 does not receive rss messages

    Hi,I have recently uninstalled a freeware VPN.
    After that outlook 2010 does not receive messages (bizarrely firefox works fine, but internet explorer does not)!
    I keep receiving error code: 0x800c0008
    I made sure that it is properly uninstalled.
    Thank you for your help!

    Hi,
    Have you subscribed any RSS Feeds before? Please go to File > Info > Account settings > "RSS Feeds" Tab and check if all the feeds are healthy (connection successful?). Remove them to check
    whether you would still receive the error code anymore.
    More information:  http://office.microsoft.com/en-001/outlook-help/unsubscribe-from-an-rss-feed-HA010024271.aspx
    The following KB could help you solve your issue.
    Troubleshooting error messages that you receive when you try to send and receive e-mail in Outlook and Outlook Express
    http://support.microsoft.com/kb/813514
    In addition, I would like to suggest you ask this in the Outlook Forums:
    http://social.technet.microsoft.com/Forums/en/outlook/threads
    Hope it helps.
    Regards,
    Blair Deng
    Blair Deng
    TechNet Community Support

Maybe you are looking for

  • Error Code 148:3 - Photoshop CS4 for Windows

    I have a message that comes up whenever I try to open Adobe Photoshop CS4 Extended. "Licensing for this product has stopped working. This product has encountered a problem which requires that you restart your computer before it can be launched If you

  • Flash builder 4.7 debug via usb device iPhone 4s - device not found

    I cannot find my iphone 4s while trying to debug via usb =( i exported ipa and installed it via itunes - this works. but i would love to debug on device. im using actionscript mobile project air 3.4 im using windows 7 ==================offtopic======

  • Will Serial ATA or SATA Hard Drives work in a Powerbook G4?

    I have a 15" Powerbook G4, 867MHz, and I'm looking to buy a new internal Hard Drive. After a few searches, it appears I need a 2.5" HD, but I don't know much about hardware so I'm hoping someone can clarify for me: Will a Serial ATA or SATA HD work o

  • PC Suite doesn't show contacts stored in SIM card ...

    I own a Nokia 6230i v. 03.88 RM-72, and am using PC Suite 6.84.10.4 on Windows XP SP2. I found out that: 1. PC Suite doesn't show in the Contacts folder those which are recorded in the SIM card, but only those from the phone memory. Why's that? 2. PC

  • How do I find how much disk storage is being used

    Being new to Apple (McBook Pro) and an old user of Windows I'm seeing some of the differences and reasons  for the change, one of the differences is to see the disk usge. How I can achieve this in Apple?. I know thats is simole but ai cnay find it. T