Possible to have an applet within an applet?

Hi. I am designing a GUI using swing. It has a Card layout ie. different tab screens. On one of them I want to implement a pannel within which the user can scribble.
I have the code for a scribble applet. can I run that applet within a pannel in my GUI?
how?
or if not, how can place the scribble code in my GUI code to work only in that pannel on one of the tab screens?
Yhis has me rightly puzzled, and I am sure there is a simple answer. I would appreciate any help on this matter,
Thanks...

I haven't tried this but it seems like it ought to work:
Since Applet extends Panel, just add an instance of the Applet to your display as you would any other panel, then call its init() and start() methods.

Similar Messages

  • Possible to have if statement within filters code?

    Hi
    I have some filters set up, and have assigned some global vars to them, which I then use in my Filters code to display the filters:
    myText:Filters [globals.data.glow1, globals.data.stroke1, globals.data.shad1]
    Works perfectly.
    Now I want to assign a global var to each global filter var to determine if it should be shown or not.  So...
    globals.data.glow1On = true;
    globals.data.stroke1On = true;
    globals.data.shadOn = true;
    ... and then somehow incorporate these new vars into an if conditional to determine if the filter global vars get included in the myText:Filters code.
    However, I cannot seem to code the if conditional into the myText:Filters code correctly.
    I even tried seperating it out like so:
    if (globals.data.glow1On = true) {myText:Filters [globals.data.glow1];
    if (globals.data.stroke1On = true) {myText:Filters [globals.data.stroke1];
    if (globals.data.shad1On = true) {myText:Filters [globals.data.shad1];
    But Flash only makes the last filter true (kinda makes sense to me now why).
    Is there a way to do it without having to make an if conditional with 7 permutations?
    Cheers
    Shaun

A: Possible to have if statement within filters code?

You are not coding the conditional properly.  "=" is for assignment, "==" is for comparing equality.
if (globals.data.glow1On == true) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On == true) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On == true) {myText:Filters [globals.data.shad1];
Also, a conditional evaluates whether or not something is true, so for Boolean values you do not need to explicitly compare them...
if (globals.data.glow1On) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) {myText:Filters [globals.data.shad1];
Lastly, for what I see that you showed, the conditionals are all missing their closing brackets, and while you can use them, the brackets are not needed for single command conditionals...
if (globals.data.glow1On){ myText:Filters [globals.data.glow1]; }
if (globals.data.stroke1On){ myText:Filters [globals.data.stroke1]; }
if (globals.data.shad1On){ myText:Filters [globals.data.shad1]; }
OR
if (globals.data.glow1On) myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) myText:Filters [globals.data.shad1];

You are not coding the conditional properly.  "=" is for assignment, "==" is for comparing equality.
if (globals.data.glow1On == true) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On == true) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On == true) {myText:Filters [globals.data.shad1];
Also, a conditional evaluates whether or not something is true, so for Boolean values you do not need to explicitly compare them...
if (globals.data.glow1On) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) {myText:Filters [globals.data.shad1];
Lastly, for what I see that you showed, the conditionals are all missing their closing brackets, and while you can use them, the brackets are not needed for single command conditionals...
if (globals.data.glow1On){ myText:Filters [globals.data.glow1]; }
if (globals.data.stroke1On){ myText:Filters [globals.data.stroke1]; }
if (globals.data.shad1On){ myText:Filters [globals.data.shad1]; }
OR
if (globals.data.glow1On) myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) myText:Filters [globals.data.shad1];

  • Load applet within another applet?

    Let's say I have two applets, A1, and A2. I'd like to load A1 on my HTML page, and I'd like A1 to load A2 within itself (i.e. not load it as another separate applet on the HTML page).
    Basically, A2 takes some parameters I would like to pass to it through A1, so I'd like to know if this is possible.
    Thanks for any help!
    James

    Totally possible. You just have to provide it an applet context
    see http://java.sun.com/j2se/1.4.2/docs/api/java/applet/AppletContext.html

  • Is it possible to have an event within an event?

    I have an event named for my niece, and I have all the pictures of her in it. I'm wondering if it's possible to have events within events, so I can just have 1 event with her name, then when you click on it, sub-events named things like "Christmas" "Thanksgiving" etc.?

    no - events are time based and can not be nested - use albums and smart albums which can be placed in folders and folders can be placed in folders for that kind of organization - Europe folder containing France and Italy folders each containing cities as an example
    Events are just a very basic and inflexible organization for people to start with - albums, folders, keywords and ratings are where the power is
    LN

  • Possible to have dynamic content within a campaign?

    Is it possible to have dynamic content elements within an email campaign so that different content appears based on a recipient's interests?

    Hey there, Nope.
    BUT
    See the BC Blog

  • Is it possible to have an attachment within a pdf doc print at the same time the main doc prints?

    Okay, so this may be kind of a weird question.  We have some users who are wanting to add a page to an already existing xml document and correct me if I'm wrong, but I've read that it's not possible to add/delete pages from a pdf that's in xml format.  Since that is not possible, I have added the page to the xml document as an attachment.  Now what I am wanting to know is if it is possible to have the attachment print out at the same time as the main document.  We are using the latest version of Adobe Reader and I have access to Adobe Acrobat Standard 9 & 10 and then I have access to Adobe Acrobat Pro 7.  I've been unable to find anyting via google or by searching this forum so hopefully I'll draw out some kind of smart cookies and we'll get this figured out.  I appreciate any and all input!
    Thanks,

    I know of no way to do this with Reader or XML.

  • Is it possible to have a selectManyListBox within ui:repeat ?

    Can I have a selectManyListBox within a <ui:repeat> or that is completely wrong ? I can displayed the values properly , however I cant retrieve the selected items in my list.
    An error is displayed "myform:j_idt117:0:j_idt119:0:_t121: Validation Error: Value is not valid"
    <ui:repeat value="#{row}" var="t" >
    <h:selectManyListbox value="#{myBean.selectedItems}">
    <f:selectItem itemValue="#{t.attributeName[1]}"
    itemLabel="#{t.attributeName[1]}" />
    <f:selectItem itemValue="#{t.attributeName[2]}"
    itemLabel="#{t.attributeName[2]}" />
    </h:selectManyListbox>
    </ui:repeat>

    You can try using SSRS cascading parameter.
    http://technet.microsoft.com/en-us/library/aa337498(v=sql.105).aspx
    http://markvsql.com/2013/08/ssrs-cascading-multi-value-parameters/
    Regards, RSingh

  • How do I run an applet within an applet?

    I'm trying to write a math applet that will also run a tic tac toe applet. if the student gets a correct answer, they get a turn, but if the answer is wrong, the computer takes a turn. kind of like hollywood squares, but with math.
    Thanks for any help that I might receive!

    separate the model from the view, then one applet can use both models and the views are just panels that one applet calls. (also, an applet with a main becomes an application and it too just re-uses the same panels and model beans) alternately, you could serve up another page that has the 'prize' page.
    I'm trying to write a math applet that will also run a
    tic tac toe applet. if the student gets a correct
    answer, they get a turn, but if the answer is wrong,
    the computer takes a turn. kind of like hollywood
    squares, but with math.
    Thanks for any help that I might receive!

  • Is it possible for an applet within a jsp to access a server session?

    I was trying to find info (and sample code) where an applet that is embedded and running within a JSP page accesses the same session of the jsp page it is in.
    The need is for the the applet to access a string within the session and capture it's value and then perform some actions with the string client side within the applet. The value of the string is not important for the example, just being able to access it is.
    Also can javascript cause the applet to call the server on say an "onclick" event? If so, how is this done?
    In otherwords, can javascript interact with an applet?

    Check out the documentation on Heterogeneous Connectivity.
    Hope this helps!

  • Why does running an applet within a portlet not work?

    Hello,
    I have an applet and I want to run this in a portlet.
    I tried to load this applet into a portlet with SunONE Studio and Portlet Builder, and it works. The applet is running without problems.
    Now I tried to run this applet in a portlet under WebLogic 8.1 SP3. But the applet doesn't load. There ist only a gray rectangle to see. No error message, which would help to find the problem.
    To load the applet I'm using the Applet tag as follows:
    <APPLET archive='"+request.getContextPath()+"/folder/myApplet.jar' code='source/applet/myapp.class' ></APPLET>
    It's the same, I am using with SunOne Studio and there is the same package/directory structure in both.
    Any ideas?
    Is ist possible to run applets within portlets under WL 8.1?
    Thank you!
    Ines

    Hello,
    I have an applet and I want to run this in a portlet.
    I tried to load this applet into a portlet with SunONE Studio and Portlet Builder, and it works. The applet is running without problems.
    Now I tried to run this applet in a portlet under WebLogic 8.1 SP3. But the applet doesn't load. There ist only a gray rectangle to see. No error message, which would help to find the problem.
    To load the applet I'm using the Applet tag as follows:
    <APPLET archive='"+request.getContextPath()+"/folder/myApplet.jar' code='source/applet/myapp.class' ></APPLET>
    It's the same, I am using with SunOne Studio and there is the same package/directory structure in both.
    Any ideas?
    Is ist possible to run applets within portlets under WL 8.1?
    Thank you!
    Ines

  • Is it possible to pass a string from an applet to the web site?

    Hi, everybody!
    Is it possible to pass a String from an applet to a web site (as a field value in a form, an ASP variable, or anything else). Basically, I have a pretty large String that is being edited by an applet. When a user clicks on the submit button, a different page will show up which has to display the modified string. The String is pretty large so it doesn't fit into the URL variable.
    Please, help!
    Thank you so much!

    Why do you want to do this in Java?
    Javascript is the correct language for these type of situations.
    for instance:
    in the head of your html document:
    <script language=javascript type="text/javascript">
    createWindow(form){
    if(form.text.value!=""){
    newDoc = new document
    newDoc.write(form.text.value)
    newWin = window.open(document,'newWin','width=200;height=150')
    </script>
    in the body:
    <form onSubmit="createWindow(this)">
    <p>
    Enter a String:<input type=text size=30 name="text">
    </p><p>
    <input type=submit value="submit"> 
    <input type=reset value="reset">
    </p>
    </form>

  • How to load an Applet on a panel, within another Applet

    Hi,
    I want to know if and how it is possible to load an applet/application on a Panel within another Applet/Apllication.
    Who can help me?
    tnx

    You want to use an applet inside an other applet?
    Applet extends Panel
    you can take the source of the second applet, and instead of extending Applet extends Panel, and call the init method from the first applet.
    Hope this help

  • Testing applets within a browser

    Hello all,
    We are testing an applet within a web browser. As soon as the app opens, it will ask the user to enter user name and pwd in a pop-up window. The openScript hasn't recorded the user inputs while record.
    Any thoughts?
    Regards,
    rookie

    Hum it reminds me a problem I had with a Forms authentication which was NOT supported by OpenScript... Long time ago though.
    First, I guess it's a load test script. Maybe you could tell us what the authentication is. Someone should know. It could then help to solve the problem. I have an example yesterday where we had to manually add the auth in the OpenScript script
    Like:
    http.addAuthentication("http://myapp", "jb",deobfuscate("2domIjZNAvyzbduYz04f/g=="));
    (right click, add other, http, authentication)
    JB

  • Applet within a table tag.

    Hi,
    I have placed an applet within a <table> tag. The applet does not get executed. I see only blank space, even though the HTML source has the applet tag. If I remove the table tags and place the applet directly in <body>, then it works fine. So there isnt any problem with the codebase or anything.
    Are there any specific rules as to inside which tags can the <applet> tag be embedded? I would apprecite any information regarding this.
    Thanks,
    RG

    This is my html file:
    <table>
         <tr>
              <td>
                   <applet code="test" />
              </td>
              <td>
                   <object ID='jsApplet' classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" >
                      <param name="code" value="test.class" />
                    </object>
              </td>
              <td>
                   <DIV id="dvObjectHolder">Applet comes here</DIV>
              </td>
         </tr>
    </table>
    <script>
    if(window.navigator.appName.toLowerCase().indexOf("netscape")!=-1){ // set object for Netscape:
         document.getElementById('dvObjectHolder').innerHTML = "        <object ID='jsApplet' classid=\"java:test.class\"" +
                    "height=\"0\" width=\"0\" onError=\"changeObject();\"" +
              ">" +
                    "<param name=\"mayscript\" value=\"Y\">" +
            "</object>";
    }else if(window.navigator.appName.toLowerCase().indexOf('internet explorer')!=-1){ //set object for IE
         document.getElementById('dvObjectHolder').innerHTML =      "<object ID='jsApplet' classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"" +
                   "         height=\"0\" width=\"0\" >" +
                   "   <param name=\"code\" value=\"test.class\" />" +
                   " </object>"
    </script>this is my applet
    public class test extends java.applet.Applet implements Runnable{
         public test(){
              // run it as an applet or run it as an application
              new Thread(this).start();
         public void init(){
         public void run(){
              System.out.println("applet started");
         public static void main(String[] args) {
                   // run it as an applet or run it as an application
                   new test();
    }I open the html file with IE6 and have no problem.

  • Include Applet Within JSPX

    Can anyone explain to me how to include an Applet within a jspx page?
    Thanks,
    Tim

    Hi,
    I'm using two applets with jspx in my application, and all components works fine.
    I'm not using the &lt;verbatim&qt; tag for applets but only for javascript.
    Here is the code I'm using :
    &lt:applet width="0" height="0" MAYSCRIPT="MAYSCRIPT"
                        code="myapplet.class" codebase="."
                        archive="myapplet.jar"&gt;
                   &lt;/applet&gt;
    rgds,
    Anthony

  • Maybe you are looking for