Code for Applet, 2 classes,ASAP!!!!

Ok, i made an applet which have 2 .class files one is AppTs.class and other is MyPot.class, what I need to write to lets say index.html
to make that applet viewable in browser. Thx.
I try this but it say Applet failed to load...
<HTML>
<BODY>
<APPLET CODE=AppTs.class WIDTH=200 HEIGHT=100>
<APPLET CODE=MyPot.class WIDTH=200 HEIGHT=100>
</APPLET>
</BODY>
</HTML>
Edited by: systat on Mar 28, 2008 8:39 AM

Ok, i made an applet which have 2 .class files one is AppTs.class and other is MyPot.class, what I need to write to lets say index.html
to make that applet viewable in browser. Thx.
I try this but it say Applet failed to load...
<HTML>
<BODY>
<APPLET CODE=AppTs.class WIDTH=200 HEIGHT=100>
<APPLET CODE=MyPot.class WIDTH=200 HEIGHT=100>
</APPLET>
</BODY>
</HTML>
Edited by: systat on Mar 28, 2008 8:39 AM

Similar Messages

  • How obtain complete source code for applet demos?

    I would like to obtain the source code for all the class files for the applet demos, especially the molecule viewer. Some of the class files do not have corresponding java files made available. Who can help me out?

    Which class files are missing?
    If you go to this site, select the applet of interest, the link at the bottom of the page (that is, the page with the running applet in it) takes you to the source. The file at that link includes all of the classes in the applet.
    http://java.sun.com/j2se/1.4.2/docs/relnotes/demos.html
    -John

  • Where can I get the source code for sun classes?

    Hello,
    When ever you download sun's j2sdk, the archive always contains the source code for the entire sdk in a zip file called src.zip except the sun.xxx classes like sun.awt.print.PrintDialog or sun.awt.font.FontResolver.
    For debugging purposes I need, if availabe, the source code of these classes which are not present in the src.zip.
    Please can someone tell me if theses classes are available as source and can point me where I can find it cause I am searching for it but can't find it on the net.
    Thank you
    Carolin

    Hey ChuckBing
    And your way is the only way, right? No.What on earth is eating you? Highly sensitive today?
    Where is the problem? There are two solutions of the question.
    The one link I posted points directly to the sun source download link. The "readme" explains, yippie, the sun sources are contained. Easy, isn't it?
    With the other one, you have to navigate at least through two other pages before you might find the link and only if you recognize that "Download JDK 5.0 source via SCSL/JRL" means the sun source code and not the sources contained in the JDK download. This is what I thought as I've seen this link the first time. Unfortunately there is no "readme".
    I prefer the easy way, I dont want to earn a doctorate. Ok, you can say dont "play the woman", but I'm a woman and a blonde too;-)
    But, let us stop the idle discussion here, please!
    Nevertheless, thanks to you and [email protected] for answering.

  • Need to view source code for API classes

    Any tips on where to find the .java files or source code for Java 2 5.0 classes?
    With Java being open source, you'd think that it woud be easy to find this. But I've tried doing a few searches but te results haven't been helpful.
    Cheers!

    Yeah I think I found it. Unfortunately there's a problem with downloading from Sun at the moment; fatal exceptions on every attempt.
    Wait and try later, I guess.

  • Awesome Site with Example Code For All Classes

    Very cool site that has example code for all the Java classes and APIs. You can submit example code yourself too!
    http://www.kickjava.com/

    kevjava wrote: Some things that I think would be useful:
    Suggestions reordered to suit my reply..
    kevjava wrote: 2. Line numbering, and/or a line counter so you can see how much scrolling you're going to be imposing on the forum readers.
    Good idea, and since the line count is only a handful of lines of code to implement, I took that option. See the [line count|http://pscode.org/stbc/help.html#linecount] section of the (new) [STBC Help|http://pscode.org/stbc/help.html] page for more details. (Insert plaintiff whining about the arbitrary limits set - here).
    I considered adding line length checking, but the [Text Width Checker|http://pscode.org/twc/] ('sold separately') already has that covered, and I would prefer to keep this tool more specific to compilation, which leads me to..
    kevjava wrote: 1. A button to run the code, to see that it demonstrates the problem that you wish for the forum to solve...
    Interesting idea, but I think that is better suited to a more full blown (but still relatively simple) GUId compiler. I am not fully decided that running a class is unsuited to STBC, but I am more likely to implement a clickable list of compilation errors, than a 'run' button.
    On the other hand I am thinking the clickable error list is also better suited to an altogether more abled compiler, so don't hold your breath to see either in the STBC.
    You might note I have not bothered to update the screenshots to show the line count label. That is because I am still considering error lists and running code, and open to further suggestion (not because I am just slack!). If the screenshots update to include the line count but nothing else, take that as a sign. ;-)
    Thanks for your ideas. The line count alone is worth a few Dukes.

  • Creating AS3 code for C++ classes converted with Alchemy (a là Box2D)

    So I've a collection of C++ classes which I now have converting fine with Alchemy to a swc file and can call the exposed functions fine from my AS3 code.
    What I'd really like to do is recreate stuff like Box2D's b2Vec.as class,
    public class b2Vec2 extends b2Base {
        public function b2Vec2(p:int) {
            _ptr = p;
        public function get v2():V2 {
            return new V2(x, y);
        public function set v2(v:V2):void {
            x = v.x;
            y = v.y;
        public function get x():Number { return mem._mrf(_ptr + 0); }
        public function set x(v:Number):void { mem._mwf(_ptr + 0, v); }
        public function get y():Number { return mem._mrf(_ptr + 4); }
        public function set y(v:Number):void { mem._mwf(_ptr + 4, v); }
    This is a simple example, but shows what I'd like to do.  On the C side of things, b2Vec2 is a struct,
    /// A 2D column vector.
    struct b2Vec2
        /// Default constructor does nothing (for performance).
        b2Vec2() {}
        float32 x, y;
    So, for this struct, it's easy to calculate that the first variable of a b2Vec2 object is a float, which will be the value in x and can be read via Alchemy's MemUser classes _mrf (read a fload from a point in memory) with _mrf(pointerAddress) and you can read in the second float with _mrf(pointerAddress + 4).
    My question is, if you're not a C++ expert (me), is there any way to get the definition of a class, as in the addresses of all the variables within and what they are?  So, for the b2Vec2 one, I'd imaging it'd be something like, float32 x 0 float34 y 4 ...
    The reason I'm asking is because one of the classes in particular has loads of variables and to try and get each and every one's information so I can access it directly from the AS3 code would be lots of work and I'm going to assume I'll introduce plenty of human error to it.

    Hi,
    I am facing the similar issue. Can you please tell me how you solved this problem in more details?
    which sample code and how u can find that in SE24 and where to copy that code.
    Thanks in advance..
    vamsi.

  • How to make packages for applets

    hi all...
    i tried the following code for applets
    package imp;
    import java.awt.*;
    import java.applet.*
    <applet code="Ex1" widt=400 height=400>
    </applet>
    public class Ex1 extends java.applet.Applet
    ---------code------
    and then i complied and used applet viewer to start the applet...but it gave the error access denied
    without the packaging, this worked fine
    regards,
    kalyan

    and then i complied and used applet viewer to start
    the applet...but it gave the error access denied If I remember correctly, when you have a package to the class, the class file should be placed in a subfolder called imp and the applet tag should use the fully qualified classname imp.Ex1

  • Class not found error for applet.

    This is probally a really simple mistake but I've tried everything and can't find it.
    My applet works fine with applet viewer - I'm running it from JBuilder. But when I open my html file in the browser it gives me a 'Class not found' error. I've tried running other applets (my own and demos on this site) and they work fine.This is the applet tag code:
    <applet code = "Rotary.class" width = "650" height = "580" align = "top">
    <!-- coordinates of sectors -->
    <param name = "sector0" value ="234,215,244,207,154,43,125,63">
    </applet>
    The class file is in the same directory as the HTML file. Do I need to specify the codebase? I tried that too - giving it the full pathname of the class.
    In the Java console it said that it couldn't find "C:Project\Rotary\javax\swing\japplet"
    I don't think it could have anything to do with the fact that I'm using swing because the other applets I used used swing.
    Please help - I'm really running out of ideas here!

    You have a similar problem like I had.
    You seem to have a too old JAVA environment for the browser - I had a too new environment.
    For all who are experiencing the same problem!
    Problem:
    You're compiling your applets with a quiet modern compiler (i.e. Netbeans Version 3.5.1)
    You are able to compile your applets without any problems but if you try your applets in "real life", the browsers can't interpret your applets [class not found]. (I tested Internet Explorer 6.0 and Netscape Navigator 4.7)
    So you need a plugin for the new JAVA environment because the JAVA environment of the browser is older than that which the applet needs.
    Well, you have the choice to demand to every user of your applet to download the new Java Runtime Environment, but then don't wonder why nobody visits your site!
    But, don't worry: I figuered out another solution, that Netbeans (www.netbeans.org) allows to compile in different JAVA versions.
    Solution:
    What you have to do is:
    - Install a previous version of JDK (i.e. JDK 1.3 - I would suggest, lower versions don't work with Netbeans 3.5.1 and JDK 1.3 is enough for IE 6.0 and NN 4.7, which I tested)
    - Go into the "bin"-directory of Netbeans (i.e. c:/netbeans3.5.1/bin)
    - Open the file "ide.cfg" (with notepad or any other texteditor)
    - You see a line like: jdkhome "C:\java\j2sdk1.4.2" -J-Xmx96m -J-Xss1024k -J-Xms24m -J-Xverify:none
    - Change the path to your other JDK you wish, like: jdkhome "C:\java\jdk1.3" -J-Xmx96m -J-Xss1024k -J-Xms24m -J-Xverify:none
    - That's it, you can compile your applets in a previous version of JAVA so that "older" browser user don't have to install a plugin for the new JAVA environment.
    Have fun!
    If you have any questions I would be pleased to help you.
    If this tip helped you already I would be pleased if you would send me a quick email with your experience.
    My email: [email protected]

  • Example codes for each and every class in API

    hi,
    Is there any place where i can get example code for eacha and every class in java API.
    for eample...if i wanna find sample codes for all the clases in java.lang.*
    please let me know ASAP.
    thanks in advance

    Try this
    http://www.javaalmanac.com/egs/
    It's almost complete, but you could help mr. Patrick Chan to write more samples for the few classes left in the Java API...

  • Example code for each and every class in java API

    hi,
    Is there any place where i can get example code for eacha and every class in java API.
    for eample...if i wanna find sample codes for all the clases in java.lang.*
    please let me know ASAP.
    thanks in advance

    Crossposted here: http://forum.java.sun.com/thread.jsp?thread=570264&forum=54&message=2820774

  • Valuation Grouping Code same- Valuation Class different for each plant

    Hi All,
    We have 5 plants assigned to the company code. We have same Chart of Accounts (1000) and all the plants are grouped together to one valuation grouping code(001).
    Now if i extend the material codes to different plants, i am able to give each valuation class to each plant. So what is the use of giving same valuation grouping code for all plants?
    I expected some error message when i changed valuation class for another plant since all plant were grouped together to one valuation grouping code. Please explain.
    Regards,
    Rosh

    Hi Rosh,
    There is a meaning of grouping valuation areas using valuation grouping code
    e.g.   Plant 1000  valuation grouping code - 0001
             Plant 2000  valuation grouping code - 0002
    Lets say  you have 3010  valuation class for material A in both plants
    So while determining  GL account for BSX key following will be combination
    VGC / Valuation         modifierValuation class         GL
    0001                                       3010                        2000
    0002                                       3010                        3000
    Means using VGC  u can Differenciate account determination for plants under same Company code
    Vishal...

  • [svn:fx-trunk] 14139: Fix for Player classes not code hinting  to framework FB projects.

    Revision: 14139
    Revision: 14139
    Author:   [email protected]
    Date:     2010-02-11 16:36:39 -0800 (Thu, 11 Feb 2010)
    Log Message:
    Fix for Player classes not code hinting  to framework FB projects. Changed all the $ tokens to use $ instead. While the compiler understands $, Flash Builder's code model does not.
    No code changes.
    QE notes: N/A
    Doc notes: N/A
    Bugs: None
    Reviewer: Pete
    Tests run: checkintests
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/airframework/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/airspark/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/flex/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/framework/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/osmf/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/rpc/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/spark/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/sparkskins/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/textLayout/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/wireframe/.actionScriptProperties

  • Where can I find the original code for class in Java API

    I am learning Java programming and wanted to see how professionals handel all cases. Can anyone tell me where I can find the original implementation code for classes in Java API? It would be a great help for me.

    the basic source is where you installed java in a file called java.src, its either in the main dir of one of the sub dirs ( mmm ), contains all the source code for all the classes in the api.

  • UML modeling for class diagrams, could not generate code for modified diagr

    Hi,
    I'm using Java studio Enterprise for creating class diagrams and generating code from the UML using round trip engineering. I'm able to create class diagrams and generate code from the diagram. I tried modifying java code for classes and saved it. Now if I try and modify the diagram its not updating the java code associated with it.
    Please suggest the workaround or so.
    Thanks
    Sunita

    Maybe the linkage between the source and model class element is broken. Try to expand the class element from the project tree to see if a source file artifact node (under the class that displays the pathname as the name of the node). If not, that's why. Then, the workaround is to manually add the pathname to the java source file. Here are the steps:
    - expand the class in question
    - select the source file artifact node
    - from the properties window on the right side of the ide, enter the exact pathname to the java source file and press the Enter
    It should work now.

  • How can i watch native code for hashCode() in Object class?

    How can i watch native code for hashCode() in Object class?

    Those are two different requirements. You still haven't told us why you want the first one.
    The second one is called JNI - Java Native Interface. There is a forum here, and a large amount of documentation, and a book about it.

Maybe you are looking for