Problems with applets.

Hi to everybody.
I've got a problem with simple applets.
I've built several applets using Swing components (JApplet, JPanel, JButton, etc.)
In my browser, the background color of my applets does correctly appear.
But none of my components does !!!! No text fields, no buttons etc.
Can someone explain to me which could be the reason of that ?
Thank's.

I've just tried appletviewer. And I discovered that there is a problem while trying to acces to a jpeg file for my JBuutons and JLabel.
Appletviewer considers these files are on the client machine and refuses the acces.
But when I try my site, the server is my computer too ! So the jpegs are on the server side !
Furthermore, when I start my web page (that contains my applets), nothing does appear (no exception) in the java console...
How can I solve this problem (I'm newer with applets)?

Similar Messages

  • Problem with Applets in same page

    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 .

    please help me its urgent for my project

  • Problem with Applet for Microsoft VM

    Hi there!
    I implemented an applet (first for SUN JVM 1.4.1_02) that has to communicate with a servlet via serialized objects. Therefore the applet sends a request and expects the response :
    //establish connection
    URLConnection l_con= l_url.openConnection();
    l_con.setUseCaches(false);
    l_con.setDoOutput(true);
    l_con.setDoInput(true);
    l_con.setRequestProperty("Content-Type", "application/x-java-serialized-object");
    //send request to servlet               
    ObjectOutputStream l_outputStream = new ObjectOutputStream(l_con.getOutputStream());     
    l_outputStream.writeObject(l_obj);                    
    l_outputStream.flush();               
    l_outputStream.close();
    //get response
    ObjectInputStream l_obInStr = new ObjectInputStream(l_con.getInputStream());
    l_response = (MyResponseClass)l_obInStr.readObject();
    l_obInStr.close();This works absolutely fine for the Sun VM. Now I have to use the Microsoft VM (because I don't want the users to install anything on their clients).
    I compiled the client classes like that:
    javac -target 1.1 classname.javaThe applet starts correctly but there is a problem with the communication that I recognized in the console:
    java.io.IOException: Cannot write output after reading input.
         at com/ms/net/wininet/http/HttpURLConnection.getOutputStream (HttpURLConnection.java)
         at myclass/MyApplet.callToServlet (MyApplet.java:109)
    Does anyone know what this error means ?
    Thanks a lot in advance.

    Hi there!
    I solved my problem by removing all the System.out.println-statements that I used for debugging issues.
    Anyway, I want to know if there are more restrictions concerning this matter for using the Microsoft VM instead of the Sun VM. (Because it HAS worked with the debugging statements with the Sun VM).
    Thank you.

  • Error loading class problem with applet (Newbie)

    Hi,
    I am new to Java applets. I try to display a simple sample. I put this into html file: <APPLET codebase="classes" code="NewApplet.class" width=350 height=200></APPLET>
    And it always appears one problem:
    Error loading class: NewApplet
    java.lang.NoClassDefFoundError
    java.lang.ClassNotFoundException: NewApplet
         at com/ms/vm/loader/URLClassLoader.loadClass
         at com/ms/vm/loader/URLClassLoader.loadClass
         at com/ms/applet/AppletPanel.securedClassLoad
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.run
         at java/lang/Thread.run
    Can anybody help please? Thanks in advance.

    Now I am able to load the applet on MAC OS X 10.4.11. This is due to network issue.
    Now my problem with the applet functionality. My applet will display the map image. Applet contains the navigation arrow keys at the top left of my applet. These keys will be used to navigate through the map.
    The problem is while user using the navigation buttons, the image got squash and stretch.
    This is happened only on MAC OS X 10.4.11 and Its working fine on PC and MAC OS X 10.5.5.
    Please anyone help in this regard. Thanks in advance.

  • Still Having Problems With Applets!!!!

    First i'd like to thank all who responded to my last post regarding a downloadable copy of the J2SE API Documentation. I have downloaded it and am quite content.
    I am still, however having a problem with my applets (all applets at that). Like i said before. I can view any applets i want through the command prompt using appletviewer. My problem is residing in execution directly through Microsoft Internet Explorer 5.x.
    When i open the .html file containing my applet, the file loads in the browser but the applet does nothing. When i mouseover the applet a message is displayed in the browser's status bar stating "loading class. classname: class not found".
    I have tried every applet i can get my hands on including downloaded applets from applet resource sites (even the example applets that came with the JDK1.4 when i downloaded it). They all react the same way, but will execute fine with the direct command prompt reference to appletviewer.
    It's getting very irritating. I have tries everything including setting the classpath in the command prompt. I'm loosing hope of a solution so if anyone might have an idea of what i need to do to fix my problem, or anything i am doing wrong or haven't done, please give me a hint or help.
    I am loving the java language and wish to further my knowledge and farmiliarity with it but i need to make sure everything works.
    Sorry for rambling and i thank whoever offers a reply in advance.
    ChanceH

    1. Check the codebase parameter in the html file that calls the applet
    for example if you have an applet named MyApplet.class inside a directory applets and your html file outside that directory you should have a codebase like this "applets/".
    <applet CODE="MyApplet.class" codebase="applets/" WIDTH=640
    HEIGHT=480 ALIGN= center>
    </applet>
    2. Be sure that your IE support java check the properties and enable the JVM.
    3. If your JVM version does not support Java 2, applets build on Java 2 will not work.

  • Problem with applet file loading

    I have a problem with loading files into a java applet. import java.applet.*;
    import java.awt.*;
    import java.io.*;
    import java.util.*;
    import java.net.*;
    public class main extends Applet {
         private static ArrayList<String> SGM;
         public void init() {
              SGM = new ArrayList<String>();
              String gameDir = getParameter("game_dir");
              try {
                   File fHandle = new File(gameDir+"game.sgm");
                   Scanner fScanner = new Scanner(fHandle);
                   while(fScanner.hasNextLine()) {
                        SGM.add(fScanner.nextLine());
                   //System.out.println(SGM.get(0));
              } catch(Exception e) {
                   System.out.println("Applet threw error: "+e);
    ...The problem is with File fHandle = new File(gameDir+"game.sgm"); I tried putting File(gameDir+"/game.sgm"); and appending / to the folder in the <PARAM> tag, but it still changes it to \, which means I can only run it locally, and in Windows. Why is it doing this, and how can I fix it?

    This file you were hoping to load: it's on the server, right? Not on the computer where the applet is running in a browser?
    (At least that's a common mistake made by people when they write their first applet.)
    If that's the case then you can't use a File object to access a file on a different computer. To access a file on the server, first you will have to put the file in a place on the server where it can be downloaded. Then in your applet you need to get a URL for the file. (The getDocumentBase() method can be used to prevent you from having to hard-code the full URL for the file.) Next, "this.getClass().getResourceAsStream(URL)" gets you an InputStream from which you can read the data from the file.

  • Problem with applet, popup window and focus loss

    Hi all !
    I've got a problem when my applet lose the focus. Let me explain :
    I've got an applet embed in a jsp page. There are several buttons in it that allow the user to open modal windows.
    The problem comes when the user gives the focus to another application whithout closing the modal window first.
    When he tries to come back to the web page owning the applet (using the task bar), then the modal window stays behind it and blocks any action on the applet.
    Does anyone know how to force the modal window to be displayed in front of the applet, even when the user plays with focuses ?
    Thank's in advance.

    thank you for your help, sils.
    I've written that code :
    * Cr�� le 31 ao�t 05
    package com.scor.apricot.web.rpc.ltnp.applet.listener.ldf;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.JDialog;
    import javax.swing.JPanel;
    public class AppletWindowListener extends WindowAdapter {
         private JPanel panel;
         private JDialog dialogWindow;
         public AppletWindowListener(JPanel panel, JDialog dialogWindow) {
              this.panel = panel;
              this.dialogWindow = dialogWindow;
         public void windowActivated(WindowEvent e) {
              if (dialogWindow!=null && dialogWindow.isShowing())
                   dialogWindow.toFront();
    }Is that right ?
    I don't know how to add the listener, where must I put the addWindowListener method ? It seems that this method cannot be used with a JApplet object.

  • Problem with applet , Not able to detect class file

    Hello friends,
    I have a swing/applet class file, and i am trying to integrate it with Tomcat webapps
    My HTMl code goes like this...........
    <APPLET ALIGN="CENTER"
                   CODEBASE="/../../classes/org/jgraph/"
                   CODE="SimpleGraph.class"
                   WIDTH="800" HEIGHT="500">
                   </APPLET>
    My classes are found inside the code base URL............
    CODEBASE="/../../classes/org/jgraph/"
    My folder structure is like below.....in which "SimpleGraph.class" is found
    D:\June5WF\Archicentro\web\WEB-INF\classes\org\jgraph\SimpleGraph.class
    My HTML resides in the following directory structure...
    D:\June5WF\Archicentro\web\WEB-INF\jsp\secure\admin\ramesh.jsp
    But When I run the JSP page .... I am Getting Class not found exception..........
    Please can anyone tell me how to solve this problem....
    I have spent 4 hrs in this......PLZ help me out.....

    Hi,
    I did not mean file object. I meant workbook object. The problem is that I can not see from your code how do you get that OLE object reference. It should be something like this
    GET PROPERTY OF h_excel 'ActiveWorkbook' = h_workbook.
    CALL METHOD OF h_workbook 'SAVEAS' EXPORTING #1 = l_file
    Regards

  • Problems with applets in IE

    When i try to make my applet work in internet explorer it just comes up with a blank grey box and an error message saying:
    load: class classname not found
    Does anyone know how i can correct this?

    if all my problems were as simple as this then i would have an easy life!
    you are probably using the applet from swing rather than awt - you need the java plugin for swing but not for awt. either use only awt gui's or download the jre plugin.

  • JDK 1.4.2_10; problem with applet/classpath/OBJECT tag

    I'm supporting an applet that needs to run in JDK 1.4.2_10 in order to work. (I don't own the code, so I can't fix the issue)
    I'd like to force that particular applet to run under JDK 1.4.2_10, but allow other applets to run on the current default JVM.
    I'm trying to do this by using the JDK's htmlconverter.exe utility to force the use of JDK 1.4.2_10. That part is working as expected, but I'm experiencing a side effect.
    The problem is that, when I use the OBJECT tag instead of the APPLET tag, the browser attempts to download the class with this URL
    http://hostname.here.com/app.testing/app.testbed/classes/appls%2fDOLARS%2fuser%2fApplet%2fclass.class
    instead of this URL
    http://hostname.here.com/app.testing/app.testbed/classes/appls/DOLARS/user/Applet.class
    The second URL works; the first does not. When I use the APPLET tag, it generates the second URL and downloads the class successfully.
    I'd like to a) use the OBJECT tag. b) get it to use the correct URL to download the Applet.class file. What do I need to do to make this happen?
    Thanks,
    Tom Valesky

    Here's the exception I'm getting (slightly sanitized):
    Java Plug-in 1.4.2_10
    Using JRE version 1.4.2_10 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\tvalesky
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to
    load: class appls/DOLARS/user/Applet.class not found.
    java.lang.ClassNotFoundException: appls.DOLARS.user.Applet.class
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         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.io.IOException: open HTTP connection failed:http://hostname.com/DOLARS.testing/dolars.testbed/classes/appls%2fDOLARS%2fuser%2fApplet%2fclass.class
         at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 7 more
    Exception: java.lang.ClassNotFoundException: appls.DOLARS.user.Applet.class

  • DoubleBuffering problem with applet

    Hi,
    We are developing an applet with multiple screens. CardLayout is being used to flip between different panels in the systems. The applet contains huge JTable and chart components and huge amount of data, which makes the refreshing of the applet very slow. We tried the DoubleBuffering concept to reduce the flickering in the JApplet class.
    Now the questions are:
    1) Do we need to do double buffering for all the panels that are used in the system ?
    2) Is there any other better way that Sun suggests to avoid flickering problems ?
    Any help will be much appreciated. Also with the email content and problem definition thread is going on, any feedback about this email is also welcomed.
    Thanks
    Anoop

    One solution is to put all the packages in a jar file.

  • IE6 openModalDialog problems with applet events

    Hi
    I have an applet within an htm document whichich is opened from another web page using the openModalDialog method (or openModelessDialog).
    The applet itself works fine, giving the desired result when I do an updateGrid(true).  However, IE just hangs if I try to add an UPDATED event to the applet.
    Any ideas?
    Nick

    Nick,
    While Glenn's solution may seem to work it is not recommended to lock your application to a particular version of the Sun JRE client, especially one that is quite old and pre-dates the corrections to the changes in Daylight Savings Time. 
    The method you are trying to use must cause an issue where the combination of Internet Explorer and the Sun Plug-in don't play well together.  I would imagine that some targeted Google searches should yield other discussions with people experiencing similar problems.  Some of the version 12.0 menu pages with popups emulate a modal effect while using a more traditional window.open method, and this should work fine with IE/Sun, irregardless of version.  If I recall correctly it uses a div that covers the area behind the popup window that stops you from clicking 'off' the popup.  A Google search might also help you find some good samples of making a traditional window.open act as a modal too.
    Regards,
    Jeremy

  • Please Help : Big problem with applets

    Hi,
    I have a big problem which I have not been able to figure out. The applet I have enclosed works fine on some computers but not on others .
    I am running :
    java version "1.3.1_02"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
    Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)
    The applet runs perfectly Ok at university but not on other computers.
    The objective of the applet is to display 3 shapes on the screen once. On the university computer it works, however at home and work the 3 shapes are continuously displayed on the screen ( like they are in some infinite loop). I have been struggling with this for days any help would be greatly appreciated.
    It would help me if some of you could run this applet and let me know if the shapes are displayed once or if the shapes are continuously updated on the screen ( assuming that the applet window is not resized covered over etc. )
    =========================================
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    /*<html><applet code = "stage1.class" height = "600" width="810"></applet></html>*/
    public class stage1 extends JApplet{
    JPanel extraPanel = new JPanel();
    public void init()
    Container c = getContentPane();
    extraPanel.setBackground (Color.white);
    extraPanel.setLayout (new FlowLayout());
    c.add(extraPanel);
    public void paint (Graphics g)
    //super.paint( g ); // call superclass's paint method
    // populate the two dimensional array - store the coordinates for the circle and square shapes
    int circle[][] = { {100,100,200,200}, // display circle in the left hand side of the screen
    {350,100,200,200}, // display circle in the middle of the screen
    {600,100,200,200} }; // display circle in the right hand side of the screen
    int rect[][] = { {100,100,200,200}, // display square in the left hand side of the screen
    {350,100,200,200}, // display square in the middle of the screen
    {600,100,200,200} }; // display square in the right hand side of the screen
    // populate the two dimensional array - store the coordinates for the polygon shapes
    int polyX[][] = { {150,250,300,250,150,100 }, // display polygon in the left hand side of the screen
    {400,500,550,500,400,350 }, // display polygon in the middle of the screen
    {650,750,800,750,650,600} }; // display polygon in the right hand side of the screen
    int polyY[] = { 100,100,200,300,300,200    }; // the "Y" co-ordinates wont change for all three polygons
    int xCoordinates[] = new int[ 6 ];
    int pickAShape
    , pickAColour
    , polygonCount = 0
    , circleCount = 0
    , squareCount = 0
    , redCount = 0
    , greenCount = 0
    , blueCount = 0
    , yellowCount = 0 ;
    for ( int position = 0;position < 3;position++ )
    pickAShape = 1 + ( int )( Math.random() * 3 );
    pickAColour = 10 + ( int )( Math.random() * 4 );
    switch ( pickAShape )
    case 1: // draw a circle
    switch ( pickAColour )
    case 10:
    g.setColor( Color.red );
    redCount++;
    break;
    case 11:
    g.setColor( Color.green );
    greenCount++;
    break;
    case 12:
    g.setColor( Color.blue );
    blueCount++;
    break;
    case 13:
    g.setColor( Color.yellow );
    yellowCount++;
    break;
    g.fillOval( circle[position][0],circle[position][1],circle[position][2],circle[position][3] );
    circleCount++;
    break;
    case 2: // draw a rectangle
    switch ( pickAColour )
    case 10:
    g.setColor( Color.red );
    redCount++;
    break;
    case 11:
    g.setColor( Color.green );
    greenCount++;
    break;
    case 12:
    g.setColor( Color.blue );
    blueCount++;
    break;
    case 13:
    g.setColor( Color.yellow );
    yellowCount++;
    break;
    g.fillRect(rect[position][0],rect[position][1],rect[position][2],rect[position][3] );
    squareCount++;
    break;
    case 3: // draw a polygon
    switch ( pickAColour )
    case 10:
    g.setColor( Color.red );
    redCount++;
    break;
    case 11:
    g.setColor( Color.green );
    greenCount++;
    break;
    case 12:
    g.setColor( Color.blue );
    blueCount++;
    break;
    case 13:
    g.setColor( Color.yellow );
    yellowCount++;
    break;
    xCoordinates[0]=polyX[position][0];
    xCoordinates[1]=polyX[position][1];
    xCoordinates[2]=polyX[position][2];
    xCoordinates[3]=polyX[position][3];
    xCoordinates[4]=polyX[position][4];
    xCoordinates[5]=polyX[position][5];
    Polygon polygonInstance = new Polygon ( xCoordinates, polyY, 6 );
    g.fillPolygon( polygonInstance );
    polygonCount++;
    break;
    // display the results
    setFont(new Font("Serif",Font.BOLD,24));
    g.setColor(Color.black);
    if ((circleCount ==3 || squareCount ==3 || polygonCount==3) && (redCount ==3 || greenCount ==3 || blueCount==3 || yellowCount ==3))
    g.drawString( "YOU WIN !!!!" ,380,400 );
    else
    g.drawString( "YOU LOSE !!!!",380,400 );
    } // end method paint
    } // end class stage4
    =========================================
    Regards and thanks

    O.K. You will not believe this, but the problem will be solved if you change the following line from:
        setFont(new Font("Serif",Font.BOLD,24));to:
        g.setFont(new Font("Serif",Font.BOLD,24));Now, since I am also learning JAVA, the way I went about solving was to create your applet from scratch, using cut and paste, and running it piece by piece till I ran into the flashing display. Took me a while. I am enclosing my version of the program for your comments.
    import java.awt.*;
    import java.applet.*;
    public class Slotto extends Applet {
        int circle[][] = { {100,100,200,200}, // circle in the left hand side of the screen
                           {350,100,200,200}, // circle in the middle of the screen
                           {600,100,200,200} }; // circle in the right hand side of the screen
        int rect[][] = { {100,100,200,200}, // square in the left hand side of the screen
                         {350,100,200,200}, // square in the middle of the screen
                         {600,100,200,200} }; // square in the right hand side of the screen
        int polyX[][] = { {150,250,300,250,150,100 }, // polygon in the left hand side of the screen
                          {400,500,550,500,400,350 }, // polygon in the middle of the screen
                          {650,750,800,750,650,600} }; // polygon in the right hand side of the screen
        int polyY[] = { 100,100,200,300,300,200 }; // the "Y" co-ordinates wont change for all three polygons
        int xCoordinates[] = new int[ 6 ];
        int pickAShape
        , pickAColour
        , polygonCount = 0
        , circleCount = 0
        , squareCount = 0
        , redCount = 0
        , greenCount = 0
        , blueCount = 0
        , yellowCount = 0
        , position ;
        public void paint(Graphics g) {
            for (position = 0; position < 3; position++) {
                chooseColor(g);
                drawTheShape(g);
            declareResults(g);
        public void chooseColor(Graphics g) {
            pickAColour = 10 + ( int )( Math.random() * 4 );
            switch ( pickAColour )
                case 10:
                    g.setColor( Color.red );
                    redCount++;
                    break;
                case 11:
                    g.setColor( Color.green );
                    greenCount++;
                    break;
                case 12:
                    g.setColor( Color.blue );
                    blueCount++;
                    break;
                case 13:
                    g.setColor( Color.yellow );
                    yellowCount++;
                    break;
        public void drawTheShape(Graphics g) {
            pickAShape = 1 + ( int )( Math.random() * 3 );
            switch ( pickAShape )
                case 1: // draw a Circle
                    g.fillOval( circle[position][0],
                                circle[position][1],
                                circle[position][2],
                                circle[position][3] );
                    circleCount++;
                    break;
                case 2: // draw a Square
                    g.fillRect(rect[position][0],
                               rect[position][1],
                               rect[position][2],
                               rect[position][3] );
                    squareCount++;
                    break;
                case 3: // draw a Polygon
                    xCoordinates[0]=polyX[position][0];
                    xCoordinates[1]=polyX[position][1];
                    xCoordinates[2]=polyX[position][2];
                    xCoordinates[3]=polyX[position][3];
                    xCoordinates[4]=polyX[position][4];
                    xCoordinates[5]=polyX[position][5];
                    Polygon polygonInstance = new Polygon ( xCoordinates,
                                                            polyY, 6 );
                    g.fillPolygon( polygonInstance );
                    polygonCount++;
                    break;
        public void declareResults(Graphics g) {
            g.setFont(new Font("Serif",Font.BOLD,24));
            g.setColor(Color.black);
            if ((circleCount ==3 || squareCount ==3 || polygonCount==3)
             && (redCount ==3 || greenCount ==3 || blueCount==3 || yellowCount ==3))
                g.drawString( "YOU WIN !!!!" ,380,400 );
            else
                g.drawString( "YOU LOSE !!!!",380,400 );
    }Regards.

  • Problems with applet loading in web browser

    Hi,
    I am using IE 6, and the JRE is 1.4.2 the problem I am facing is, in my application applet is not getting loaded.. I treid with JRE 1.5 and even JRE 1.4.1. in both cases its working .. but with JRE 1.4.2.. its giving the problem.. can some one please give the reason why it is happening so. and provide me some solution??
    Thanks in advance

    Is JRE 1.5 and 1.4.1 installed on the same machine? If so , how are you switching the JRE versions?
    Please let me know the whole scenario. Thanks.

  • Problem with applet.getUserName() to fetch currently logged userid

    Hi,
    I am using applet.getPropertyValue("IllumLoginName") to fetch the currently logged in user. But in some places there is already an MII function used applet.getUserName() to fetch current logged in UserID. But the problem is when a user logs in the MII with a UserID : USERA and does some operation and logsoff and he logs in as a new user with ID : USERB, but MII fetches the USERA instead of USERB. After some investigations we found that it is because we are using getUserName() function of applet which is fetching the previously logged in userid.
    Please let me know what is the differece between these 2 functions.
    Browser : IE7+
    MII Version : 11.5
    Java version: 1.5.0_06
    Thanks in Advance,
    Raj.

    As you have found the .getUserName is only good for the initial user, so you must use the .getPropertyValue approach.
    The applets only 'log themselves in' once, so the getPropertyValue is the true check for the UME session user.
    You could also use this approach in an irpt page and request it with javascript as well:
    <input type="hidden" id="WhoDat" value="{IllumLoginName}">
    Regards,
    Jeremy

Maybe you are looking for

  • Captivate 8 modules exported in SCORM 1.2

    hello there, I need help with Captivate 8 modules exported in SCORM 1.2 Placed on an LMS, the modules do not work. below the results on cloud.scorm.com.

  • Update IDM Account and Resource attribute

    How can i update the resource attribute of users while updating their IDM account from file upload?

  • How to monitor / shutdown processes and users?

    Hi, As you can see in my previous post i'm totally new to Arch and fairly new to Linux... Here's one thing that bothers me: I don't know how to keep track of all running processes (and end them if needed... I guess you need to 'kill' them but you fir

  • Translate to russian in freehand

    How translate from spanish to russian (cirilic font) using freehand. Please, this is urgent! Help me! Thanks ¿Cómo traducir al ruso (fuente cirílica) usando Freehand? Me urge! Ayuda, por favor! Gracias

  • Who can explain the account determination in SD...

    Hi, For example: 1)How account setting involved in SD? 2)Why we need set account in SD? 3)Normally used account config in SD process??? 4)How FI and SD intergrated for those terms like sales revenue, cash discount, sales discount, sales return..?? 5)