Hi. Problems with NumberGuessing Game Applet.

hi. thanks for taking time to read this. can anyone tell me where my mistake is? cause my button just won't work. espically when i press my Guess Now Button. any suggestion of imporvement? thanks for ur time.
Here's my coding.
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.util.Random;
public class NumberGuess extends Applet
implements ActionListener
     Button guessnow;
Button start;
     TextField inputNum;
int count = 3;
     int guess,number;
     int x;
     String one,two;
public void init()
          guessnow = new Button("Guess Now");
add(guessnow);
guessnow.addActionListener(this);
          inputNum = new TextField(4);
          inputNum.addActionListener( this );
     add( inputNum );
     start = new Button("Start New Guess");
add(start);
start.addActionListener(this);
          Panel p = new Panel();
     p.setLayout(new BorderLayout());
p.add("North", inputNum);
     p.add("West", guessnow);
     p.add("East", start);
add(p);
public static void genNum(String [] args)
                    int random=1+(int)(Math.random()*11);
public void actionPerformed( ActionEvent event ){
          one = event.getActionCommand();
     if (one.equals("Guess Now"))
          guess = Integer.parseInt( inputNum.getText() );
          inputNum.setText("");
          x = 1;
          count = count - 1;
two = event.getActionCommand();
          if else(two.equals("Start New Guess"))
          count = 3;
x = 2;
          }repaint();
public void paint (Graphics g) {
     g.drawString("Number is ranging from 0-10.",25,80);
     if(x== 2){
     int random=1+(int)(Math.random()*11);
     g.drawString("You have 3 Tries to Guess The Number.",25,90);
if (x==1){
               if (count <=0){
g.drawString("You Have Used Up All 3Tries. The Number is" + number + ".",25,90);
               else if (guess != number)
                    g.drawString("Wrong.Try Again!",25,90);
                    g.drawString("you have" + count + "left",25,100);     
               else {
                    g.drawString("thats right. u got the right answear",100,140);          

Came up 2 days back - Is this the same person did you see this?
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class n extends Applet implements ActionListener{
   Button guess, start;
   TextField input;
   int x = 0, ans, random, count;
   String inst = "Press the 'Start new guess' button to start new game.";
public void init() {
   input=new TextField(10);
   add(input);
   input.addActionListener(this);
   guess=new Button("Guess Now!");
   add(guess);
   guess.addActionListener(this);
   start=new Button("Start new guess");
   add(start);
   start.addActionListener(this);
public void paint(Graphics g) {
   g.drawString("Number is ranging from 0-10.",120,65);
   g.drawString(inst,60,135);
   if (x==1)g.drawString("You have "+count+" tries.",100,135);
      if (x==2) {
         if ((ans > random) && (count >= 1)) {
            g.drawString("Wrong, your guess is too high, try again.",25,90);
            g.drawString("You have "+count+" more tries.",25,110);
      if ((ans < random) && (count >= 1)) {
         g.drawString("Wrong, your guess is too low, try again.",25,90);
         g.drawString("You have "+count+" more tries.",25,110);
      if (count==0) {
         g.drawString("Game Over!",115,120);
         g.drawString("Press the 'Start New Guess' to play again.",100,135);
x=0;
      else if (random == ans){
         g.drawString("That's right !!! Congratulations !!!",115,120);
         g.drawString("Press the 'Start New Guess' to play again.",100,135);
         x=0;
   } // x=2 close
public void actionPerformed(ActionEvent event) {
     if ((event.getSource().equals(start)) && (x==0)) {
        random=1+(int)(Math.random()*10); // generates random number 1 to 10
        inst = "";
        x = 1;
        count = 3;
     if (event.getSource().equals(guess)) {
        ans=Integer.parseInt(input.getText());
        x = 2;
        count--;
   repaint();
}

Similar Messages

  • Problem with GUI in applet

    Hai to all,
    I am having a problem with GUI in applets
    My first class extends a JPanel named A_a
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    public class A_a extends JPanel
    JButton jb;
    JTextArea text;
    public A_a()
    setLayout(new FlowLayout());
    jb=new JButton("Click me");
    //add(jb);
    text=new JTextArea(5,20);
    add(text);
    public void text_appendText(String aa)
    System.out.println("I AM IN A_a");
    text.append(aa);
    text.revalidate();
    revalidate();
    /*public static void main(String ags[])
    A_a a = new A_a();
    JFrame frame=new JFrame();
    frame.getContentPane().add(a);
    frame.pack();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) { System.exit(0); }
    frame.setSize(200,200);
    frame.show();
    and then I am using other class B_b which is an applet carries a exitsing panel (A_a) inside it .
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class B_b extends JApplet
    public A_a a;
    public void init()
    a=new A_a();
    getContentPane().add(a);
    public void text_appendText(String aa)
    final String aaa =aa;
    new Thread(new Runnable()
    public void run()
    a=new A_a();
    a.setBackground(new java.awt.Color(255,200,200));
    System.out.println("I AM IN B_b");
    a.text.append(aaa);
    a.text.revalidate();
    getContentPane().remove(a);
    resize(500,500);
    }).start();
    and the I am using the second applet C_c in which by performing a button action the old panel A_a should get removed and replace the new panel D_a (which is not here )in the applet B_b with all other components(namely button , text fields etc)
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.util.*;
    public class C_c extends JApplet implements ActionListener
    JButton jbt;
    JTextArea jta;
    public void init()
    getContentPane().setLayout(new FlowLayout());
    jbt=new JButton("Click me");
    jbt.addActionListener(this);
    getContentPane().add(jbt);
    jta=new JTextArea(5,20);
    getContentPane().add(jta);
    public void actionPerformed(ActionEvent ae)
    Enumeration e = getAppletContext().getApplets();
    Applet applets = null;
    while(e.hasMoreElements())
    applets=(Applet)e.nextElement();
    if ( applets instanceof B_b)
    System.out.println("I AM CLASS C_c");
    ((B_b)applets).text_appendText(jta.getText());
    ((B_b)applets).remove());
    ((B_b)applets).getContentPane().add(D_d);
    both the applets C_c and B_b are in same browser page
    How can i achive that pls help .

    Just to make the code readable...
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    public class A_a extends JPanel
    JButton jb;
    JTextArea text;
    public A_a()
    setLayout(new FlowLayout());
    jb=new JButton("Click me");
    //add(jb);
    text=new JTextArea(5,20);
    add(text);
    public void text_appendText(String aa)
    System.out.println("I AM IN A_a");
    text.append(aa);
    text.revalidate();
    revalidate();
    /*public static void main(String ags[])
    A_a a = new A_a();
    JFrame frame=new JFrame();
    frame.getContentPane().add(a);
    frame.pack();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) { System.exit(0); }
    frame.setSize(200,200);
    frame.show();
    }and then I am using other class B_b which is an applet carries a exitsing panel (A_a) inside it .
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class B_b extends JApplet
    public A_a a;
    public void init()
    a=new A_a();
    getContentPane().add(a);
    public void text_appendText(String aa)
    final String aaa =aa;
    new Thread(new Runnable()
    public void run()
    a=new A_a();
    a.setBackground(new java.awt.Color(255,200,200));
    System.out.println("I AM IN B_b");
    a.text.append(aaa);
    a.text.revalidate();
    getContentPane().remove(a);
    resize(500,500);
    }).start();
    }and the I am using the second applet C_c in which by performing a button action the old panel A_a should get removed and replace the new panel D_a (which is not here )in the applet B_b with all other components(namely button , text fields etc)
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.util.*;
    public class C_c extends JApplet implements ActionListener
    JButton jbt;
    JTextArea jta;
    public void init()
    getContentPane().setLayout(new FlowLayout());
    jbt=new JButton("Click me");
    jbt.addActionListener(this);
    getContentPane().add(jbt);
    jta=new JTextArea(5,20);
    getContentPane().add(jta);
    public void actionPerformed(ActionEvent ae)
    Enumeration e = getAppletContext().getApplets();
    Applet applets = null;
    while(e.hasMoreElements())
    applets=(Applet)e.nextElement();
    if ( applets instanceof B_b)
    System.out.println("I AM CLASS C_c");
    ((B_b)applets).text_appendText(jta.getText());
    ((B_b)applets).remove());
    ((B_b)applets).getContentPane().add(D_d);
    }

  • Problem with focus on applet  - jvm1.6

    Hi,
    I have a problem with focus on applet in html page with tag object using jvm 1.6.
    focus on applet work fine when moving with tab in a IEbrowser page with applet executed with jvm 1.5_10 or sup, but the same don't work with jvm1.6 or jvm 1.5 with plugin1.6.
    with jvm 1.5 it's possible to move focus on elements of IEbrowser page and enter and exit to applet.
    i execut the same applet with the same jvm, but after installation of plugin 1.6, when applet gain focus don't release it.
    instead if i execute the same applet with jvm 1.6, applet can't gain focus and manage keyevent, all keyevent are intercepted from browser page.
    (you can find an example on: http://www.vista.it/ita_vista_0311_video_streaming_accessibile_demo.php)
    Any idea?
    Thanks

    Hi piotrek1130sw,
    From what you have described, I think the best approach would be to restore the original IDT driver, restart the computer, test that driver, then install the driver update, and test the outcome of installing the newest driver.
    Use the following link for instructions to recovery the ITD driver using Recovery Manager. Restoring applications and drivers.
    Once the driver is restored, restart the computer and test the audio. If the audio is good you can continue to use this driver, or you can reinstall the update and see what happens. IDT High-Definition (HD) Audio Driver.
    If installing the newest driver causes the issue to occur but the recovered driver worked, I suggest recovering again.
    If neither driver works I will gladly follow up and provide any assistance I can.
    Please let me know the outcome.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Problem with a signed applet and a user machine.

    Hello. I´m having some problems with a signed applet with some dependences.
    In one particular computer the applet doesn´t load.
    The java version installed in that computer is 1.6.0_25.
    The invocation tag:
    <applet name=applet id="applet" code=Applet/RequestApplet.class width=155 height=21 archive="RequestApplet.jar " MAYSCRIPT>
       <param id="parametro1" name="usuario" value="<Computed Value>">
    </applet>The RequestApplet.jar and dependences:
       bcmail-jdk13-145.jar(signed by bouncy castle), jce-ext-jdk13-145.jar(signed by bouncy castle), AbsoluteLayout.jar, plugin.jar, RequestApplet.jar(signed by me)*this files are all in the same folder.
    The requestApplet.jar manifest:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.1
    X-COMMENT: Main-Class will be added automatically by build
    Class-Path: bcmail-jdk13-145.jar jce-ext-jdk13-145.jar plugin.jar Abso
    luteLayout.jar
    Created-By: 10.0-b23 (Sun Microsystems Inc.)
    Main-Class: Applet.RequestApplet
    Name: Applet/ResponseApplet$1.class
    SHA1-Digest: fO5IPiwEH3OhvlprhBecmMIAVJI=
    Name: Applet/NewJApplet.class
    SHA1-Digest: 6XSpm7lQEQRi39TegoUYv2aFJrk=
    Name: Applet/ResponseApplet.class
    SHA1-Digest: v1EbKUFB+QdvO05xx8UzAMNIyRs=
    Name: Applet/ResponseApplet$4.class
    SHA1-Digest: XH4I67psXZTelpz0AMAYc/Ej8QY=
    Name: Applet/RequestApplet$1.class
    SHA1-Digest: KAP5sAC4Thv/6GClkFAdGUVzgYA=
    Name: Applet/ResponseApplet$5.class
    SHA1-Digest: CVPnKrW2SgNEkRzYnVnQe3KGrIU=
    Name: Applet/ResponseApplet$3.class
    SHA1-Digest: SjfW1k1K7BA9m3AxmHi+jvRE+9o=
    Name: Applet/ResponseApplet$2.class
    SHA1-Digest: 3Pu18CZMLuEh7/n3y7XxFSkuNQY=
    Name: Applet/RequestApplet.class
    SHA1-Digest: Tky85es5+o371adetH9XVEI2Z+o=The error:
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
         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.plugin2.applet.Plugin2Manager$12.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
         at java.awt.EventQueue.access$000(Unknown Source)
         at java.awt.EventQueue$1.run(Unknown Source)
         at java.awt.EventQueue$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         ... 20 more

    Thanks. I´ll try with your tips. But if i put all the dependences in archive I get this error.
    The tag:
    <applet name=applet id="applet" CODEBASE="." code="Applet/RequestApplet.class" width=155 height=21 archive="bcmail-jdk13-145.jar, jce-ext-jdk13-145.jar, AbsoluteLayout.jar, plugin.jar, RequestApplet.jar " MAYSCRIPT>
       <param id="parametro1" name="usuario" value="<Computed Value>">
    </applet>The error:
    Java Plug-in 1.6.0_25
    Usar versión JRE 1.6.0_25-b06 Java HotSpot(TM) Client VM
    Directorio local del usuario = C:\Documents and Settings\Administrator
    c:   borrar ventana de consola
    f:   finalizar objetos en la cola de finalización
    g:   liberación de recursos
    h:   presentar este mensaje de ayuda
    l:   volcar lista del cargador de clases
    m:   imprimir sintaxis de memoria
    o:   activar registro
    q:   ocultar consola
    r:   recargar configuración de norma
    s:   volcar propiedades del sistema y de despliegue
    t:   volcar lista de subprocesos
    v:   volcar pila de subprocesos
    x:   borrar antememoria del cargador de clases
    0-5: establecer nivel de rastreo en <n>
    basic: Receptor de progreso agregado: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@f39b3a
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/bcmail-jdk13-145.jar
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/jce-ext-jdk13-145.jar
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/AbsoluteLayout.jar
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/plugin.jar
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/RequestApplet.jar

  • Hello i have a problem with a game on game center can you help me?

    hello i have a problem with a game on game center can you help me?

    Perhaps, but you will need to provide a little more detail.

  • I am having problem with my games application...non of the game run smoothly and also the games close automaticially

    I am having problem with my games application... no idea where is the problem. non of the game run smoothly 1st in 1st its hard to open the apps in it open than also it will close automatically. Please help me out

    Try This...
    Close All Open Apps...  Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430
    Also consider Deleting any Apps you have Purchased / Downloaded but you now never use..
    If necessary...
    Connect to iTunes on the computer you usually Sync with and “ Restore “...
    http://support.apple.com/kb/HT1414

  • Problem with video games

    Hi all,
    I have a problem with video games on Windows 8.1.
    On my Windows 7 I could play all games without any problems.
    Now I installed Windows 8.1 and I have problems with running video games: lower FPS, game breakdowns and sometimes even texture problems inside the game.
    I tried to reinstall both Windows and Graphic drivers. I tried several versions of drivers.
    I have Radeon HD 6870 and AMD Phenom II X4 955, SSD disk, 12 GB RAM.
    The point is: the same games works perfect on Windows 7 but doesn't work right on Windows 8.1.
    Can you, please, tell me if is there any other solution except going back to Windows 7 ?

    Hi,
    Please verify if these games are compatible with Windows 8.1.
    If yes, please download and install the proper version of game file and driver.
    Karen Hu
    TechNet Community Support

  • I just had problems with a game called call of duty 4, modern warfare.  I decided that if I deleted it, I could reinstall it, I could get it back to normal. After I deleted it,I went to to the appstore and went to purchases and accidentaly deleted it/help

    I just had problems with a game called call of duty 4, modern warfare.  I decided that if I deleted it, I could reinstall it, I could get it back to normal. After I deleted it,I went to to the appstore and went to purchases and accidentaly deleted it.  please help me!

    You have not deleted it from the purchases list, it is just hidden. To unhide an app, open the Mac App Store app, click the Account link in the Quick Links to the right of the pane and go to the iTunes in the Cloud section where you can manage hidden apps.

  • I was playing candy crush and I had too much problem with my bill your charge too much I want to know what is the problem with this game cost

    HELLO
    I was playing candy crush and I had too much problem with my bill your charge too much I want to know what is the problem with this game cost

    Take it up with iTunes Support - we are not Apple here, we are just users like you:
    http://www.apple.com/support/itunes/ww/
    Cheers,
    GB

  • Satellite L870-16C -display problems with some games

    Hi,
    I've bought this laptop recently and it turned out that i have tearing problems with some games.
    But really not with all games, just some of them (ex: the witcher, borderlands, trine...).
    So i was wondering what the problem could be?
    So far, i've heard it could be a v-sync problem, but everything i've done regarding this didn't change a thing.
    Is it just a software issue or could it be a hardware problem with the graphic card?
    I'm considering sending back my laptop to Toshiba, so i wanted to know if this was the only solution (and if it was a solution indeed).
    For information, it's a L870-16C with a ati radeon HD 7670m graphic card (driver version: 12.10-130101a-151427E-ATI), operating on windows 8 64 bit.
    Does anyone have some clues?
    thanks
    Message was edited by: Bakappoi

    What game problems do you have exactly?
    Could you be more precise?
    You said that you have some problems but NOT with all games.
    Therefore I dont think that you have an hardware problem
    In most cases (any) games issues are related to graphic card drivers in my long gaming experience, all issues which I had in the past were related to compatibility problems between driver and game.

  • Problem with one game

    I have a problem with the league
    of legend, after theirs update the game just die(only in win10) , no
    work anymore,  go
    only 5-6 seconds and stops.
    what can i do?

    Christian
    If it only happens in their game it is their problem.  They need to make it compatible with win 10 not the other way around.
    If you would care to investigate it upload your event viewer logs.  If not I suggest you contact them again
    Please provide us with your Event Viewer administrative logs by following these steps:
    Click Start Menu
    Type eventvwr into Search programs and files (do not hit enter)
    Right click eventvwr.exe and click Run as administrator
    Expand Custom Views
    Click Administrative Events
    Right click Administrative Events
    Save all Events in Custom View As...
    Save them in a folder where you will remember which folder and save as Errors.evtx
    Go to where you saved Errors.evtx
    Right click Errors.evtx -> send to -> compressed (zipped) folder
    Upload the .zip file to Onedrive or a file sharing service and put a link to it in your next post
    If you have updated to win 8.1 and you get the error message "the system cannot find the file specified" it is a known problem.
     The work around is to edit the registry.  If you are not comfortable doing this DONT.  If you are, backup the key before you do
    Press Win+"R" and input regedit
    Navigate to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels. Delete "Microsoft-Windows-DxpTaskRingtone/Analytic"
    Wanikiya and Dyami--Team Zigzag

  • Problems with (selfcompiled) gnome-applets

    I have experienced problems with gnome-applets. Those that come with a basic gnome installation work fine and there is no problem adding them to the panel. However, when I use selfcompiled applets I always get the following error when trying to add them.
    The panel encountered a problem while loading "OAFIID:GNOME_HDAPS_STATUSApplet".
    (Where OAFIID: is followed by the applets name.)
    I tried pkgbuilds from the AUR like 'ontv' and 'gnome-hdaps-applet' and I've tried compile applets manually. Always the same issue. I don't know what's wrong. I've found threads where people get that error message on any applet but I didn't find a solution to my problem, as all my other applets work fine. Any ideas?

    Have you done any Gnome updates since this applet was compiled? I seem to recall having a similar problem with an applet I built and, falling back to the Windows days, did a reboot, rebuilt the applet, and then all was well after I reinstalled the applet.
    Not sure if this will help, but it cannot hurt.
    Bob

  • Problem with accessing Signed Applet from javascript method

    Hi,
    I am facing the following problem while accessing Signed Applet from javascript method.
    java.security.AccessControlException: access denied (java.io.FilePermission c:/temp.txt read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at FileTest.testPerm(FileTest.java:19)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
         at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
    I am using jdk1.5 for my development...
    Can anyone help to resolve this security issue. Urgent...
    Thanks in advance.

    Hey thanks. I wasn't able to get it to work with that sample but I did find this very similar code that does allow javascript to call JFileChooser in an applets public method.
    java.security.AccessController.doPrivileged(
    new java.security.PrivilegedAction()
    public Object run(){                           
    //do your special code here
    return null; //return whatever you want
    It seems a bit tempermental in that if you don't select a file quickly, it will hang the browser....no perfect solution but I'm going in the right direction.
    Thanks,
    Scott

  • Graphics Problems with several games!!!

    When I turn antialiasing on and run Unreal 2 and Raiven Shield, I can see some "corrupted pixels" or something like that on my screen!!!Can someone HELP  me?
    Win XP Pro/SP1 (all latest updates)
    Athlon XP 1800+
    Chaintech 7NJL1(N-Force 2)(Latest Drivers)
    GForce 4 Ti 4200 (Not overclocked)(Nvidia Detonators 43.45)(DX 9.0)
    2 x 256 DDR 266 MHz
    WD 40 GB 8 MB Cache
    Power Supply 350 W
    Teac CD-W548E
    ASUS DVD-ROM E616
    Creative SB Live 1024(Latest Drivers)
     

    As I see you use det.XP drivers 43.45. I have read many topics on different boards people having rendering problems with this drivers in games.
    When I have upgraded to 43.45 I have experienced 10% performance drop in 3DMark2001SE and also some problems in Line of sight - Vietnam.
    Your problem could be in this drivers. Get 41.09 - for me, this is the best drivers released so for for NVIDA cards.
    My system:
    MSI K7T Turbo 6330 3.0 (VIA 4in1 hyperion 4.45)
    1.33 GHz Athlon
    512 MB RAM
    MSI G4 Ti4600 (detonatorXP 41.09)
    SB Audigy 2 (latest drivers 02/2003)
    80 GB Seagate
    19" Philips Briliance
    dual boot for WinMe / WinXP SP1
    DirectX 9

  • Connection problems with online games

    I have been having problems with all of online games while using the wireless WRT100 router. I am having problems connecting with all the players... Some players I can connect with, but some I can't. I think it might have something to do with a firewall or opening ports. Can someone please help me with this.

    are you palying computer games, or using gaming device like XBOX PS3 etc. Which games do you play? Did you try updating firmware?

Maybe you are looking for

  • App store not working after installing Mavericks

    After I installed OS Mavericks the app store no longer responds. This means I cannot install any of the updates. The notes app is also not working. I can start the programmes but they do not respond or close. I have to literraly close them through th

  • CSCtq10477 - Callmanager 9.1 can't make outbound calls, Route List gets error 41 - All devices busy

    Hi all I seem to have run into bug CSCtq10477 and maybe CSCul71689 and CSCum85086, where calls can be received from an MGCP gateway, but fail outbound with Callmanager logs showing 03095771.002 |17:34:14.103 |AppInfo  |RouteListCdrc::null0_CcSetupReq

  • My IMAC G5 First Generation WONT SLEEP by itself

    I have more than a year with this amazing machine. About a month ago it only will sleep manually, even when my external HD is off, no printer conected and IDISK not sync. Any help ? I search in the forums but most common trouble seems to be the oppos

  • Navigation of Artists

    Is there an easy way to navigate through artists (ex. find a specific artist) without using the scroll bar? I have a huge music library and even getting to a particular letter of the alphabet takes a bit of time. It would be cool if Apple would updat

  • 'CAST' operation ('?=' or 'MOVE ?TO')

    Hi Experts, Need your support to understand and fix below WD A error. The error is apearing due to casting taking place in Component Controller, could you please redirect me to fix it. Error: It was tried to assign a reference to a rereference variab