Swing applet view problem in IE

Hi,
I am new to Java and have to develop a web enabled tool where the servlets in my Solaris-Tomcat web server is manipulating with data in an oracle database. The client code is on Swing Applet, which is to be opened in Internet Explorer 5.5 from Windows NT platform.
In view of this, I have written a small swing applet and it is not opening in IE. I heard that I need to use HTML converter to run Swing applets in IE. But, Is it enough to download the HTML converter for Solaris and install it in the server and convert the html pages where <applet> tag is included? Or , do I need to install the HTML converter for windows to all the client machines?
Please help. This is very urgent.
Thanks in adance.

You can use this html code :
<html>
     <body>
          <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = 695 HEIGHT = 525 codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
               <PARAM NAME = CODE VALUE = MyApplet >
               <PARAM NAME = CODEBASE VALUE = "." >
               <PARAM NAME = ARCHIVE VALUE = "MyApplet.jar" >
               <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
               <PARAM NAME="scriptable" VALUE="false">
          </OBJECT>
     </body>
</html>
replacing only the dimension, the code value and removing or modifying archive value.
Don't modiy the classid. This code indicates to the browser to use the Sun Java VM instead of its own vm.
I hope this helps,
Denis

Similar Messages

  • Bad Applet Viewing Problem

    I have tried this with the recent versions of the Runtime Environment 1.4.2 and 1.5.0 Beta 2 and I get slightly different, but the same problem.
    When I try to view an applet in a web page with 1.4.2, it looks for jvm.dll in \bin\hotspot\ when it's usually in \bin\client\
    When I try to view an applet in a web page with 1.5.0, it looks for jvm.dll in \bin\server\when it's usually in \bin\client\
    and the thing is, those directories don't even exist.
    I've searched the knowledge base and found this problem 3 times but it says they fixed. Help?

    I just fixed mt problem, here's how i did it:
    I installed a fresh copy of the 1.4.2 Runtime and restarted my computer
    Then I opened Internet Explorer and went to Tools > Internet Options > Advanced to make sure the checkbox under Sun Java for the <Applet> tag was checked
    then I went to Tools > Sun Java Console and did the following things, I do not remember which ones affected it but I have a good hunch which one probably made it work:
    I switched the radio button to "Show the Console"
    I disabled Cahcing files
    And changed the Java Directory from default to the install directory like C:\Java\jre1.4.2\
    I think chnaging the directory made the biggest difference. But one problem I was making when I was continously reinstalling and unistalling was every time I did that, I did restart to have the changes take effect.

  • Swing applet refresh problem in JRE1.6

    Now , i met a problean in java swing project which troubled me for a long time, that i want to ask for some suggestions, I really very very thank you.
    The problean is :
    we use the swing in the applet , and run it with JRE 1.6, we find that the interface often disappear and appears blank when refresh the page , but when we use the mouse to over the control which in the interface ,then this control will appear . Then we try to reduce some not used codes/packets in this project , then we find that this phenomenon will appear less often.
    This defect will not appear in JRE 1.4 and JRE 1.5. And also it will not appear when just run it as a desktop program.
    I don't know if it is a bug in JRE 1.6 or it is due to our program. Can you give me some suggestions ? Thank you!
    More information like following document :
    =================================================================================================
    2, Problem happen condition :
         Applet with swing;
         Run in JRE1.6 environment;
         Open or refresh the applet web page;
         IE, Netscape, Mozilla , almost all explorers.
    3, Problean describe :
         Open the Start.html page and click the �Pre-Provisioning Tool� button to open the PPT.html page. There is a configuration applet which uses swing in the PPT page. When we open or refresh this page , the applet often disappear and show blank. And when we move the mouse over the position of the control which in the applet , these controls then will appear again. But if we use the buttons which in the applet to open and back to the applet tab page, it will not show blank.
         At last we find that this problem is a very common problem when run applet in JRE1.6. It may happen whenever you run the applet which uses swing controls in JRE1.6.
         And I find that we use �Ctrl + Alt + Del� to lock the computer and then login in again when the page is blank, then the page will turn ok and the applet will appear.
         This prolem just happen in JRE1.6 environment . If in JRE1.4 or 1.5 it performes good.
    4, What cause this issue :
         Until now , we have no successful and perfect solution to solve this problem completely. And we still don�t know the real reasons that causes this issue.. We find that there are some people in internet also met this issue and has no solution.
         But we can give some options to try to find the real reasons. And we also have been try some time :
    It may a bug for JRE1.6. We can sure that it is not a bug for explorers, because it happens the same in all explorers. If it�s a JRE bug , I think we can only to waite the newer version JRE to solve this issue.
    It due to our program. If this is true, I think we may modify the program to solve this sssue. But I�m afraid that it may need us to modify too much.
    5, What works we have been try :
    5.2 For our program : We try such ways :
         1) If the project too big and too much to download : We remove the not needed modules that in TCOTool project. .
         Result : This problem happened less often
         2) If some methods are not compatible between JRE 1.4/1.5 and JRE1.6 : I try to modify these method to fit JRE1.6 and compile the project by jDK1.6. (Methed such as show() to setVisible(true), hidden() to setVisible(false) )
         result : This problem happened less often but it�s also will happen.
         3) If operator too much when open PPT/SUT : such as load xml file too much times and so on.
    6, About our project :
    6.1 The applet web page :
    <OBJECT
    classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codebase = "application/x-java-applet;version=1.6"
    width="860" height="640">
    <PARAM NAME = CODE VALUE = "com.installApplet" >
    <PARAM NAME = CODEBASE VALUE = "./jar/" >
    <PARAM NAME = ARCHIVE VALUE = "TCOTools.jar" >
    <PARAM NAME = MAYSCRIPT VALUE = true >
    <PARAM NAME = "type" VALUE = "application/x-java-applet;version=1.6">
    <PARAM NAME = "scriptable" VALUE = "false">
    <PARAM NAME = "java.security.manager" VALUE>
    <PARAM NAME = "java.security.policy" VALUE="java.policy" />
    <PARAM NAME = "func" VALUE="1" />
    <COMMENT>
         <EMBED
    type = "application/x-java-applet;version=1.6" \
    CODE = "com.installApplet" \
    JAVA_CODEBASE = "./jar/" \
    ARCHIVE = "TCOTools.jar" \
    WIDTH = "100px" height="30px" \
    MAYSCRIPT = true \
    java.security.manager = \
    java.security.policy ="java.policy" / \
    func="1" \
         scriptable = false \
         pluginspage = "application/x-java-applet;version=1.6">
         <NOEMBED>
    </NOEMBED>
         </EMBED>
    </COMMENT>
    </OBJECT>
    6.2 The TCOTools.jar is almost 15Mb totally. So it need sometime to download this file. But we just test it in local.
    =======================================================================================================
    Welcome you to send mail to [email protected]

    I will start by stating that I really have no idea what the problem could be. I will add to that by stating that I am going way out on a limb here.
    That said - have you checked all your browser settings, cleared your cache and all the other things one usually does when an Applet acts quirky?
    Also, have you tried the Applet tag instead of Object just for a test?
    Sorry I can't do better than that, but w/o seeing the code, it's going to be difficult for anyone to help I think unless they have had a similar problem.

  • Swing Applet in JSP: problem with fetching data from database

    i am facing a problem while fetching data from database using Swing Applet plugged in a JSP page.
    // necessary import statements
    public class NewJApplet extends javax.swing.JApplet {
    private JLabel jlblNewTitle;
    private Vector vec;
    public static void main(String[] args) {
    JFrame frame = new JFrame();
    NewJApplet inst = new NewJApplet();
    frame.getContentPane().add(inst);
    ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
    frame.pack();
    frame.setVisible(true);
    public NewJApplet() {
    super();
    initGUI();
    private void initGUI() {
    try {
    this.setSize(542, 701);
    this.getContentPane().setLayout(null);
    jlblTitle = new JLabel();
    this.getContentPane().add(jlblTitle);
    jlblTitle.setText("TITLE");
    jlblTitle.setBounds(197, 16, 117, 30);
    jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
    jlblNewTitle = new JLabel();
    this.getContentPane().add(jlblNewTitle);
    Vector vecTemp = getDBDatum(); // data fetched fm DB r stored here.
    jlblNewTitle.setText(vecTemp.get(1).toString());
    jlblNewTitle.setBounds(350, 16, 117, 30);
    jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));
    } catch (Exception e) {
    e.printStackTrace();
    }//end of initGUI()
    private Vector getDBDatum() {
    // fetches datum from oracle database and stores it in a vector
    return lvecData;
    }//end of getDBDatum()
    }//end of class
    in index.jsp page i have included the following code for calling this applet:
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
    width="600" height="300">
    <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>
    if i view it in using AppletViewer it runs perfectly and display the data in JLabel. (ie, both jlblTitle and jlblNewTitle).(ie, DATA FETCHES FROM db AND DISPLAYS PROPERLY)
    BUT IF I CLICK ON INDEX.JSP, ONLY jlblTitle APPEARS. jlblnNewTitle WILL BE BLANK(this label name is supposed to fetch from database)
    EVERY THING IS DISPAYING PROPERLY EXCEPT DATA FROM DATABASE!!!
    i signed the applet as follows :
    grant {
    permission java.security.AllPermission;
    Can any body help me to figure out the problem?

    This is the Swing Applet java code
    import java.awt.Dimension;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Vector;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.JScrollPane;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTree;
    import javax.swing.ScrollPaneConstants;
    import javax.swing.SwingConstants;
    public class HaiApplet extends javax.swing.JApplet {
         private JLabel     jlblTitle;
         private JLabel     jlblNewTitle;
         private Vector     vec;
         * main method to display this
         * JApplet inside a new JFrame.
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              NewJApplet inst = new NewJApplet();
              frame.getContentPane().add(inst);
              ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
              frame.pack();
              frame.setVisible(true);
         public HaiApplet() {
              super();
              initGUI();
         private void initGUI() {
              try {               
                   this.setSize(542, 701);
                   this.getContentPane().setLayout(null);
                        jlblTitle = new JLabel();
                        this.getContentPane().add(jlblTitle);
                        jlblTitle.setText("OMMS");
                        jlblTitle.setBounds(197, 16, 117, 30);
                        jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
                        jlblTitle.setHorizontalAlignment(SwingConstants.CENTER);
                        jlblTitle.setForeground(new java.awt.Color(0,128,192));
                        jlblNewTitle = new JLabel();
                        this.getContentPane().add(jlblNewTitle);
                        Vector vecTemp = getDBDatum();
                        jlblNewTitle.setText(vecTemp.get(1).toString());
                        jlblNewTitle.setBounds(350, 16, 117, 30);
                        jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));     
              } catch (Exception e) {
                   e.printStackTrace();
         }//end of initGUI()
         private Vector getDBDatum() {
              Vector lvecData = new Vector(10,5);
              Connection lcon = null;
              Statement lstmt = null;
              ResultSet lrsResults = null;
              String lstrSQL = null;
              String lstrOut = null;
              try {
                   OmmsDBConnect db = new OmmsDBConnect();
                   lcon = db.connectDb();
                   lstmt = lcon.createStatement(lrsResults.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
                   lstrSQL = "select DT_ID from P_DATATABLES";
                   lrsResults = lstmt.executeQuery(lstrSQL);        
                   int i = 0;
                   lrsResults.last();
                   int length = lrsResults.getRow();
                   System.out.println(length);
                   lrsResults.beforeFirst();
                   int recCount = 0;
                   while (lrsResults.next()) {
                        recCount++;
                        lvecData.addElement(new String(lrsResults.getString("DT_ID")));
                   //     System.out.println("ID :  " + lrsResults.getString(1));
                        i++;
                   }System.out.println("here 3 out fm while");
              catch(SQLException e) {
                   System.out.print("SQLException: ");
                   System.out.println(e.getMessage());
              catch(Exception ex) {
                   lstrOut = "Exception Occured " + ex.getMessage();
              finally {
                   try {
                        lrsResults.close();
                        lstmt.close();
                        lcon.close();
                        System.out.println("[DONE]");
                   catch(Exception e) {
                        System.out.println(e);
             }//end of finally
              return lvecData;
         }//end of getDBDatum()
    }//end of classOfcourse the above code compiles and runs well. in Applet Viewer
    I plugged the above Swing Applet in a JSP page index.jsp
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
                   width="600" height="300">
         <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>Every thing is working fine in AppletViewer...But if i view this in any browser, then only the jlblTitle is displaying. jlblNewTitle is not displaying(this label name is actually fetching from thedatabase)
    can any body help me regarding this matter.? Thx in Advance.

  • Swing applet looks different in browser than in applet viewer

    I'm developing an applet using Net Beans 5.0. When I run the applet in the applet viewer I get a totally different look and feel than when I run the applet in a web broser. The background colors are different, the buttons are a totally different style and color, and some buttons that show up essentially transparent in the applet viewer are totally opaque in the browser.
    The applet viewer is the one that looks like the interface that I designed in the Net Beans GUI builder, so can anyone tell me how I make it look the same in a Web Browser?

    It looks like you're right, so how do I ensure that
    my applet will look the same on different versions of
    JVM? There's got to be a way, right??yes. you should look into javas pluggable look and feel system.
    the cross-platform (java) look and feel changed dramatically between versions 1.3, 1.4, and 1.5.
    however, if you use another look and feel, such as motif, or perhaps your system's look and feel (windows, mac, etc), the program should look pretty much the same (perhaps a little different, but not like the differences in the Java look and feel).
    if you want to be COMPLETELY sure that they will always look the same, select a third party look and feel that comes packaged in a jar file that you are free to distribute with your applet.
    Some good third party look and feels are JGoodies Plastic, and Incors Alloy. And there are others.
    if you use one of those, it should look pretty well the same on all platforms, and in all JVM's.
    - Adam

  • Java Swing Applets in Mac Os

    hi there,
    I am a student at the University of Portsmouth in the UK in my third and last year. I am doing my dissertation as a game using applets for a client at the university of which there consits four prototypes. One of the main specification points is that it should work on an apple mac, therefore I am using Swing applets. however with my first prototype it works fine on windows in windows Explorer, firefox and Netscape but i cant get it to work on Mac os 9 or X even with the latest version of java installed on the machine. Can anyone tell me why this is so, I would be very gratefull.
    As I cant post the whole applet here as a file download I will just put some code snippets of the main program classes.
    Applet ------------------------------
    * Class JugglingBalls - A sub class of JApplet that combines the GameInterface and GamePanel into a single application
    * @author (Liam Morren)
    * @version (v1.0)
    import java.awt.*;
    import javax.swing.*;
    public class JugglingBalls extends JApplet
        // instance variables -----------------------------------------------------------------------------------------------------------------------------------
        private GamePanel gamePanel; // The game panel including game and render loop
        private GameInterface gameInterface; // The swing interface to modify the game scene components
        // JApplet methods -------------------------------------------------------------------------------------------------------------------------------------
         * Called by the browser or applet viewer to inform this JApplet that it
         * has been loaded into the system. It is always called before the first
         * time that the start method is called.
        public void init()
            gamePanel = new GamePanel();
            gameInterface = new GameInterface(gamePanel.getGameScene());
            Container content = getContentPane(); // The container for components in the applet
            setLayout(new BoxLayout(content, BoxLayout.X_AXIS));
            content.add(gamePanel);
            content.add(gameInterface);
         * Returns information about this applet.
         * An applet should override this method to return a String containing
         * information about the author, version, and copyright of the JApplet.
         * @return a String representation of information about this JApplet
        public String getAppletInfo()
            // provide information about the applet
            return "Title: JugglingBalls  \nAuthor: Liam Morren  \nA simple application showing balls juggling in the air.";
    Interface -------------------------------------
    * Class GameInterface - Lets you manipulate the game components using swing components
    * @author (Liam Morren)
    * @version (v1.0)
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    public class GameInterface extends JPanel
        // instance variables -------------------------------------------------------------------------------------------------------------------------------------
        private GameScene gameScene; // Reference to the game scene
        private JTabbedPane gameTabs; // Tabs for Game, Balls and Background
        // Scene panel
        JButton pause, start, reset; // Buttons
        // Balls panel
        JRadioButton redBall, greenBall, blueBall, archBall, figureOfEightBall; // Radio buttons
        JCheckBox canSplit; // Check box
        JComboBox setAllPaths, setAllTypes, newBall, selectBall; // Drop down boxes
        JButton deleteBall; // Button
        Ball currentBall; // Current ball being changed
        // Background panel
        JRadioButton black, white, red, green, blue, hide, show, stop, move, arch, figureOfEight; // Radio buttons
        // Constructors -------------------------------------------------------------------------------------------------------------------------------------------
         * Constructor for objects of class GameInterface
        public GameInterface(GameScene gameSceneIn)
            gameScene = gameSceneIn; // Reference to the game scene
            gameTabs = new JTabbedPane(); // JTabbedPane to hold different toolbars
            gameTabs.setPreferredSize(new Dimension(200, 494)); // Set the preffered size for the tabbed pane
            currentBall = gameScene.getBall(0); // First ball
            // Add the panels to the tabbed pane
            gameTabs.addTab("Scene", makeScenePanel());
            gameTabs.addTab("Balls", makeBallsPanel());
            gameTabs.addTab("Background", makeBackgroundPanel());
            add(gameTabs); // Add the tab to the game interface panel
            setPreferredSize(new Dimension(200, 200));
        // Other methods ------------------------------------------------------------------------------------------------------------------------------------------
         * makeScenePanel
         * @return JPanel - The scene panel with buttons added
        private JPanel makeScenePanel()
            // Make scene panel
            JPanel scenePanel = new JPanel();
            scenePanel.setLayout(new BoxLayout(scenePanel, BoxLayout.Y_AXIS)); // Change layout
            pause = new JButton("Pause"); // Make buttons
            start = new JButton("Start");
            reset = new JButton("Reset");
            // Add button actions
            pause.addActionListener(new ActionListener() // Add button listener to pause button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    gameScene.setPaused(true); // Pause game
            start.addActionListener(new ActionListener() // Add button listener to start button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    gameScene.setPaused(false); // Unpause game
            reset.addActionListener(new ActionListener() // Add button listener to reset button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    gameScene.reset(); // Reset game
                    updateSelectBallComboBox();
                    changeSelectedBall(0);
            scenePanel.add(pause); // Add buttons to scene panel
            scenePanel.add(start);
            scenePanel.add(reset);
            return scenePanel;
         * makeBackgroundPanel
         * @return JPanel - The background panel with buttons added
        private JPanel makeBackgroundPanel()
            // Make scene panel
            JPanel backgroundPanel = new JPanel();
            backgroundPanel.setLayout(new GridLayout(5, 1, 2, 2)); // Change layout
            // Make buttons
            // background colour buttons
            JPanel backgroundcolour = new JPanel(); // Change backgroundcolour panel
            backgroundcolour.setBorder(BorderFactory.createLineBorder(Color.black));
            black = new JRadioButton("Black"); // Radio buttons to change colour
            white = new JRadioButton("white");
            black.setSelected(true); // Set black as already selected
            ButtonGroup backColourGroup = new ButtonGroup(); // Group buttons so only one can be pressed at a time
            backColourGroup.add(black); // Add buttons to group
            backColourGroup.add(white);
            backgroundcolour.setLayout(new GridLayout(2, 2, 0, 0)); // Change layout
            backgroundcolour.add(new JLabel("Background colour")); // Add label
            backgroundcolour.add(black); // Add buttons to colours panel
            backgroundcolour.add(white);
            // Add radio button actions
            black.addActionListener(new ActionListener() // Add button listener to black button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    gameScene.setBackgroundColour(false); // Background colour = black
            white.addActionListener(new ActionListener() // Add button listener to white button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    gameScene.setBackgroundColour(true); // Background colour = white
            // colour buttons
            JPanel colours = new JPanel(); // Change colours panel
            colours.setBorder(BorderFactory.createLineBorder(Color.black));
            red = new JRadioButton("Red"); // Radio buttons to change colour
            green = new JRadioButton("Green");
            green.setSelected(true); // Set green as already selected
            blue = new JRadioButton("Blue");
            ButtonGroup colourGroup = new ButtonGroup(); // Group buttons so only one can be pressed at a time
            colourGroup.add(red); // Add buttons to group
            colourGroup.add(green);
            colourGroup.add(blue);
            colours.setLayout(new GridLayout(2, 2, 0, 0)); // Change layout
            colours.add(new JLabel("Change colours")); // Add label
            colours.add(red); // Add buttons to colours panel
            colours.add(green);
            colours.add(blue);
            // Add radio button actions
            red.addActionListener(new ActionListener() // Add button listener to red button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    if (gameScene.getBackgroundEffect().getColour() != 0)
                        gameScene.getBackgroundEffect().setColour(0); // Background effect colour = red
            green.addActionListener(new ActionListener() // Add button listener to green button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    if (gameScene.getBackgroundEffect().getColour() != 1)
                        gameScene.getBackgroundEffect().setColour(1); // Background effect colour = green
            blue.addActionListener(new ActionListener() // Add button listener to blue button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    if (gameScene.getBackgroundEffect().getColour() != 2)
                        gameScene.getBackgroundEffect().setColour(2); // Background effect colour = blue
            // hide buttons
            JPanel hideShow = new JPanel(); // Change hideShow panel
            hideShow.setBorder(BorderFactory.createLineBorder(Color.black));
            hide = new JRadioButton("Hide"); // Radio buttons to hide show
            show = new JRadioButton("Show");
            show.setSelected(true); // Set show as already selected
            ButtonGroup hideShowGroup = new ButtonGroup(); // Group buttons so only one can be pressed at a time
            hideShowGroup.add(hide); // Add buttons to group
            hideShowGroup.add(show);
            hideShow.setLayout(new GridLayout(2, 2, 0, 0)); // Change layout
            hideShow.add(new JLabel("Hide / Show")); // Add label
            hideShow.add(hide); // Add buttons to hideShow panel
            hideShow.add(show);
            // Add radio button actions
            hide.addActionListener(new ActionListener() // Add button listener to hide button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                        gameScene.getBackgroundEffect().hide(); // Hide
            show.addActionListener(new ActionListener() // Add button listener to show button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                        gameScene.getBackgroundEffect().unHide(); // Unhide
            // stopMove buttons
            JPanel stopMove = new JPanel(); // Change StopMove panel
            stopMove.setBorder(BorderFactory.createLineBorder(Color.black));
            stop = new JRadioButton("Stop"); // Radio buttons to stop move
            move = new JRadioButton("Move");
            stop.setSelected(true); // Set stop as already selected
            ButtonGroup stopMoveGroup = new ButtonGroup(); // Group buttons so only one can be pressed at a time
            stopMoveGroup.add(stop); // Add buttons to group
            stopMoveGroup.add(move);
            stopMove.setLayout(new GridLayout(2, 2, 0, 0)); // Change layout
            stopMove.add(new JLabel("Stop / Move")); // Add label
            stopMove.add(stop); // Add buttons to stopMove panel
            stopMove.add(move);
            // Add radio button actions
            stop.addActionListener(new ActionListener() // Add button listener to stop button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                        gameScene.getBackgroundEffect().setMove(false); // stop
            move.addActionListener(new ActionListener() // Add button listener to move button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                        gameScene.getBackgroundEffect().setMove(true); // move
            // changePath buttons
            JPanel changePath = new JPanel(); // Change changePath panel
            changePath.setBorder(BorderFactory.createLineBorder(Color.black));
            arch = new JRadioButton("Arch"); // Radio buttons to change path
            figureOfEight = new JRadioButton("Figure of eight");
            arch.setSelected(true); // Set stop as already selected
            ButtonGroup changePathGroup = new ButtonGroup(); // Group buttons so only one can be pressed at a time
            changePathGroup.add(arch); // Add buttons to group
            changePathGroup.add(figureOfEight);
            changePath.setLayout(new GridLayout(2, 2, 0, 0)); // Change layout
            changePath.add(new JLabel("Change Path")); // Add label
            changePath.add(arch); // Add buttons to changePath panel
            changePath.add(figureOfEight);
            // Add radio button actions
            arch.addActionListener(new ActionListener() // Add button listener to arch button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                        gameScene.getBackgroundEffect().setPath(new Arch()); // Arch
            figureOfEight.addActionListener(new ActionListener() // Add button listener to figureOfEight button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                        gameScene.getBackgroundEffect().setPath(new FigureOfEight()); // Figure of eight
            // Add components to background panel
            backgroundPanel.add(backgroundcolour);
            backgroundPanel.add(colours);
            backgroundPanel.add(hideShow);
            backgroundPanel.add(stopMove);
            backgroundPanel.add(changePath);
            return backgroundPanel;
         * makeBallsPanel
         * @return JPanel - The ball panel with buttons added
        private JPanel makeBallsPanel()
            // Make balls panel
            JPanel ballsPanel = new JPanel();
            ballsPanel.setLayout(new BoxLayout(ballsPanel, BoxLayout.Y_AXIS)); // Change layout
            // Make buttons
            // set all drop down boxes
            JPanel setAll = new JPanel(); // Set all panel
            setAll.setBorder(BorderFactory.createLineBorder(Color.black));
            String[] setAllPathsChoices = {"Arch", "Figure of eight"}; // Selections for set all paths
            setAllPaths = new JComboBox(setAllPathsChoices); // Add selections to combo box
            String[] setAllTypesChoices = {"Primary ball", "Pastel ball", "3D ball", "Image ball"}; // Selections for set all types
            setAllTypes = new JComboBox(setAllTypesChoices); // Add selections to combo box
            setAll.add(new JLabel("Set all paths")); // Add combo boxes to set all panel
            setAll.add(setAllPaths);
            setAll.add(new JLabel("Set all types"));
            setAll.add(setAllTypes);
            // Add combo box actions
            setAllPaths.addActionListener(new ActionListener() // Add selection listener to set all paths combo box
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    if (setAllPaths.getSelectedItem() == "Arch")
                        gameScene.setAllPathsArch();
                    else
                        gameScene.setAllPathsFigureOfEight();
            setAllTypes.addActionListener(new ActionListener() // Add selection listener to set all types combo box
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    if (setAllTypes.getSelectedItem() == "Primary ball")
                        gameScene.setAllTypesPrimaryBall();
                    else if (setAllTypes.getSelectedItem() == "Pastel ball")
                        gameScene.setAllTypesPastelBall();
                    else if (setAllTypes.getSelectedItem() == "Image ball")
                        gameScene.setAllTypesImageBall();
                    else
                        gameScene.setAllTypesBall3D();
            // new ball drop down box
            JPanel newBallPanel = new JPanel(); // new ball panel
            newBallPanel.setBorder(BorderFactory.createLineBorder(Color.black));
            String[] newType = {"Primary ball", "Pastel ball", "3D ball", "Image ball"}; // Selections for new ball
            newBall = new JComboBox(newType); // Add selections to combo box
            newBallPanel.add(new JLabel("New ball")); // Add combo boxes to new ball panel
            newBallPanel.add(newBall);
            // Add combo box actions
            newBall.addActionListener(new ActionListener() // Add selection listener to newBall combo box
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    String ballType = (String) newBall.getSelectedItem();
                    if (ballType == "Primary ball")
                        gameScene.addBall(new PrimaryBall(gameScene));
                    else if (ballType == "Pastel ball")
                        gameScene.addBall(new PastelBall(gameScene));
                    else if (ballType == "Image ball")
                        gameScene.addBall(new ImageBall(gameScene));
                    else
                        gameScene.addBall(new Ball3D(gameScene));
                    updateSelectBallComboBox();
                    changeSelectedBall(gameScene.getBalls().size() - 1); // Update interface to show new ball
            // selected ball panel
            JPanel selectedBallPanel = new JPanel(); // selected ball panel
            selectedBallPanel.setBorder(BorderFactory.createLineBorder(Color.black));
            // Select ball
            selectBall = new JComboBox(gameScene.getBallList()); // Add ball list to the select drop down box
            deleteBall = new JButton("DeleteBall"); // Delete button
            // Ball colour
            redBall = new JRadioButton("Red"); // Red choice
            redBall.setSelected(true); // Start as selected
            greenBall = new JRadioButton("Green"); // Green choice
            blueBall = new JRadioButton("Blue"); // Blue choice
            ButtonGroup ballColour = new ButtonGroup(); // So only one colour can be selected at a tim
            ballColour.add(redBall);
            ballColour.add(greenBall);
            ballColour.add(blueBall);
            // Path
            archBall = new JRadioButton("Arch"); // Arch path choice
            archBall.setSelected(true); // Start as selected
            figureOfEightBall = new JRadioButton("Figure of eight"); // Figure of eight path choice
            ButtonGroup ballPath = new ButtonGroup(); // So only one path can be selected at a tim
            ballPath.add(archBall);
            ballPath.add(figureOfEightBall);       
            // Can split
            canSplit = new JCheckBox("Can split", false); // Initialy not selected
            selectedBallPanel.add(new JLabel("Select ball")); // Add components to selected ball panel
            selectedBallPanel.add(selectBall);
            selectedBallPanel.add(deleteBall);
            selectedBallPanel.add(new JLabel("Ball colour"));
            selectedBallPanel.add(redBall);
            selectedBallPanel.add(greenBall);
            selectedBallPanel.add(blueBall);
            selectedBallPanel.add(new JLabel("Path"));
            selectedBallPanel.add(archBall);
            selectedBallPanel.add(figureOfEightBall);
            selectedBallPanel.add(canSplit);
            // Add select ball drop down box action
            selectBall.addActionListener(new ActionListener() // Add selection listener to selectBall combo box
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    changeSelectedBall(selectBall.getSelectedIndex()); // Change the selected ball using the index from the select ball drop down box
            // Add delete button action
            deleteBall.addActionListener(new ActionListener() // Add selection listener to deleteBall button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    int tempIndex = selectBall.getSelectedIndex(); // Temp index
                    if (gameScene.getBalls().size() > 1) // If there is more than 1 ball left
                        gameScene.removeBall(tempIndex); // Remove ball
                        updateSelectBallComboBox(); // Update with new ball list
                        changeSelectedBall(tempIndex - 1); // Update interface with new current selected ball
            // Add radio button colour actions
            redBall.addActionListener(new ActionListener() // Add button listener to redBall button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    if (currentBall.getColour() != 0)
                        currentBall.setColour(0); // currentBall colour = red
            greenBall.addActionListener(new ActionListener() // Add button listener to greenBall button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                    if (currentBall.getColour() != 1)
                        currentBall.setColour(1); // currentBall colour = green
            blueBall.addActionListener(new ActionListener() // Add button listener to blueBall button
                public void actionPerformed(ActionEvent ev) // Background colour = blue
                    if (currentBall.getColour() != 2)
                        currentBall.setColour(2); // currentBall colour = blue
            // Add path radio button actions
            archBall.addActionListener(new ActionListener() // Add button listener to arch button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                        currentBall.setPath(new Arch()); // Arch
            figureOfEightBall.addActionListener(new ActionListener() // Add button listener to figureOfEight button
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                        currentBall.setPath(new FigureOfEight()); // Figure of eight
            // Add can split check button actions
            canSplit.addActionListener(new ActionListener() // Add button listener to can split
                public void actionPerformed(ActionEvent ev) // Overide actionPerformed() method
                        currentBall.setCanGiveBirth(canSplit.isSelected()); // Ball can split if can split check button is selected
            // Add components to ball panel
            ballsPanel.add(setAll);
            ballsPanel.add(newBallPanel);
            ballsPanel.add(selectedBallPanel);
            return ballsPanel;
         * changeSelectedBall
         * @param  ballIndexIn - The numbered index of the ball in the game scene list of balls. If less than 0 then equals 0. If more than ball list size then equals last ball
        public void changeSelectedBall(int ballIndexIn)
            if (ballIndexIn < 0) // Make sure index is within bounds
                ballIndexIn = 0;
            else if (ballIndexIn >= gameScene.getBalls().size())
                ballIndexIn = gameScene.getBalls().size() - 1; // Else put within bounds at either end
            currentBall.highlight(false); // Unhighlight current ball
            currentBall = gameScene.getBall(ballIndexIn); // Get new current ball
            currentBall.highlight(true); // Highlight new current ball
            // Update controls to new ball
            selectBall.setSelectedIndex(ballIndexIn);
            switch (currentBall.getColour()) // Update colour controls
                case 0: redBall.setSelected(true); break;
                case 1: greenBall.setSelected(true); break;
                default: blueBall.setSelected(true); break;
            if (currentBall.getPath() instanceof Arch) // If path is arch
                archBall.setSelected(true); // Update controls as arch
            else
                figureOfEightBall.setSelected(true); // Else figure of eight
            canSplit.setSelected(currentBall.canGiveBirth()); // Set if the ball can split or not
         * updateSelectBallComboBox
         * This method updates the combo box selection model with a new one made from the updated balls arraylist from the game scene
        public void updateSelectBallComboBox()
            DefaultComboBoxModel model = new DefaultComboBoxModel(gameScene.getBallList());
            selectBall.setModel(model);
    }Kind regards
    Liam morren

    http://docs.info.apple.com/article.html?artnum=301073
    This link states Mac OS X 10.4 now supports Java 5.0. It does mention nothing about Mac OS 9 or previous version of OS X. The problem you may be facing is that your Mac is running only 1.4.2 or less. The class files compiled for Java 5.0 can't run in non 5.0 versions of the Java Virtual Machine. Java 5.0 was a major release for the Java language and thus the change in numbering (though it took a little bit for this to change).
    Anyway you should confirm what version of Java you have installed on your Mac.
    At a command prompt:
    java -version
    The above URL states that the previous 1.4.2 Java version is not uninstalled, and this could still be the preferred version to use for Java applications even after installing Java 5.0.
    The URL above states there is a utility to set your apps to use Java 5.0 as the perferred Java version. Who knows maybe this is all you need to do. I hope this is the case, then it probably is an easy fix, otherwise you may need to rewrite your app in Java 1.4.2 to get it to run on your version of Mac.

  • Cannot use SWING Applets!

    I tried to use Netscape 6.2 Browser with "Java(TM) Plug-in: Version 1.4.0" to start an swing applet. but what i got was an error in the java-Console. In the dokumentation i counld not find a hint to solve the problem.
    java-Consol error message:
    java.lang.IllegalArgumentException
         at sun.net.www.ParseUtil.decode(Unknown Source)
         at sun.net.www.protocol.file.Handler.openConnection(Unknown Source)
         at sun.plugin.net.protocol.file.Handler.openConnection(Unknown Source)
         at java.net.URL.openConnection(Unknown Source)
         at sun.applet.AppletPanel.getAccessControlContext(Unknown Source)
         at sun.applet.AppletPanel.getClassLoader(Unknown Source)
         at sun.applet.AppletPanel.createAppletThread(Unknown Source)
         at sun.applet.AppletPanel.init(Unknown Source)
         at sun.plugin.AppletViewer.appletInit(Unknown Source)
         at sun.plugin.viewer.LifeCycleManager.initAppletPanel(Unknown Source)
         at sun.plugin.viewer.WNetscapePluginObject$Initer.run(Unknown Source)
    HTML File for applet start:
    <!-- The following code is specified at the beginning of the <BODY> tag. -->
    <SCRIPT LANGUAGE="JavaScript"><!--
    var info = navigator.userAgent; var ns = false;
    var ie = (info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0
    && _info.indexOf("Windows 3.1") < 0);
    //--></SCRIPT>
    <COMMENT><SCRIPT LANGUAGE="JavaScript1.1"><!--
    var _ns = (navigator.appName.indexOf("Netscape") >= 0
    && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0
    && java.lang.System.getProperty("os.version").indexOf("3.5") < 0)
    || _info.indexOf("Sun") > 0));
    //--></SCRIPT></COMMENT>
    <!-- The following code is repeated for each APPLET tag -->
    <SCRIPT LANGUAGE="JavaScript"><!--
    if (_ie == true) document.writeln('
    <OBJECT
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="200" height="200" align="baseline"
    codebase="http://java.sun.com/products/plugin/1.4/jinstall-14-win32.cab#Version=1,4,0,mn">
    <NOEMBED><XMP>');
    else if (_ns == true) document.writeln('
    <EMBED
    type="application/x-java-applet;jpi-version=1.4" width="200" height="200"
    align="baseline" code="swingtest.swingtest.class" codebase="html/"
    model="models/HyaluronicAcid.xyz"
    pluginspage="http://java.sun.com/products/plugin/1.4/plugin-install.html">
    <NOEMBED><XMP>');
    //--></SCRIPT>
    <APPLET code="swingtest.swingtest.class" codebase="html/" align="baseline"
    width="200" height="200">
    </XMP>
    <PARAM NAME="java_code" VALUE="swingtest.swingtest.class">
    <PARAM NAME="java_codebase" VALUE="html/">
    <PARAM NAME="java_type" VALUE="application/x-java-applet;jpi-version=1.4">
    <PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
    <PARAM NAME="scriptable" VALUE="true">
    No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!
    </APPLET></NOEMBED></EMBED>
    </OBJECT>
    <!--
    <APPLET code="swingtest.swingtest.class" codebase="html/" align="baseline"
    width="200" height="200">
    <PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
    No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!
    </APPLET>
    -->

    Use the search bar to the left and you will find many things...
    Follow the link in the post below:
    http://forum.java.sun.com/thread.jspa?threadID=483984&messageID=2567249

  • How use system.out.println with a Java Swing Applet?

    Hi guys,
    I was just wondering what can I use to view output on the Java console with a Java Swing Applet?
    At the moment I'm using a JTextArea within the Applet for debugging but I want output to appear in the browser java console but system.out.println doesn't work.
    I'm viewing the Swing Applet on Netscape 4.7 browser.
    Any ideas?

    System.out.println()s work fine! I'm guessing that your problem is that you are looking at the wrong console window!
    You're using the Java Plug-in, right? On Windows, go to your Control Panel and double click "Java Plug-in". You should find a checkbox option to "Show Java Console" - make sure this is checked. Next time you fire up you JApplet, you should see a Java Console window popup.
    Hope this helps!

  • Oracle JDBC and Swing Applets

    Hi
    I'm trying yo connect to an oracle databse using the oracle thin driver
    in a Swing Applet deriving from JApplet class using a JTable .
    Note my browser is Swing enabled and i can view normal swing applets.
    But i get an error which says
    Oracle/jdbc/driver/oracel/driver not found
    But if i run this as an application instead of a swing applet it works
    Remember it's a Swing Applet not a normal Applet.and the oracle driver works in a normal application.this error occurs only when the oracle driver is used in a Swing Applet.
    any ideas?
    mail me at [email protected]
    '**********************Heres the code************************
    import java.sql.*;
    import java.lang.*;
    import java.awt.*;
    import java.applet.Applet;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    <applet code =testdata.class width=300 height=300></applet>
    class databaseconnect{
    public Connection conn;
    public ResultSet rs;
    databaseconnect(){}
         public void connect(){
              try{
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());     
              conn = DriverManager.getConnection("jdbc:oracle:thin:@theserver:1521:dbase", "un", "pw");
              }catch(SQLException e) { }
         public ResultSet getdata(){
              try{
              Statement st = conn.createStatement();
              rs = st.executeQuery("select * from tt");
              }catch (SQLException e) { }
         return rs;
    class toggledata{
    static ResultSet rs;
    static String s,r;
    //public static void main(String args[]){
    databaseconnect data = new databaseconnect();
    public String makestr(){
         s = "1";
         r = "1";
         try{
         data.connect();
         rs = data.getdata();
              while(rs.next()){
                   s = s + "," + rs.getString(1);
                   r = r + " " + rs.getString(2);
         }catch (SQLException e) {}
         //System.out.println(s);
         //System.out.println(r);
    return s;
    public class testdata extends JApplet{
    int d,cont,y;
    String t;
    char n,m;
    int c;
    Object h;
    //public testdata(){
    public void init(){
         //super("My First Oracle Application");
         cont = 0;
         y=1;
         h = ",";
         //colstr e = new colstr();
         toggledata f = new toggledata();
         String rs = new String(f.makestr());
         Object [][] data = new Object [1][15];
         char chars [] = rs.toCharArray();
         for(int x=0; x<15; x++){
              data [0][cont] = new Integer(chars[x]);
              cont = cont + 1;
         String [] col ={"a","b","c","d","e","f","g","h","i","f","g","h","i","j","k"};
         final JTable table = new JTable(data, col);
         table.setPreferredScrollableViewportSize(new Dimension(500, 70));
         JScrollPane scrollPane = new JScrollPane(table);
         getContentPane().add(scrollPane, BorderLayout.CENTER);
    //public static void main(String args []){
    //     testdata g = new testdata();
    //     g.pack();
    //     g.setVisible(true);
    Thanks

    continued...
    I re-read your problem , your problem is as same as me.
    So, unzip classes12.zip oy folder /htdocs/ on your server
    , when this file is unziped it will create the necessary
    folders and files so your program will find the drivers
    classes and I think your problem is solved.
    Thanks Jamanir

  • Unable to download images in a swing applet (1.3.1) behind proxy

    Hi
    One of my client have a proxy server and firewall and when they try to access my webserver
    then all the AWT applet are downloaded and rendered on client properly. However, the swing applet written
    using JDK 1.3.1 is downloaded and rendered but it doesn't display anything properly as images
    are not down loaded. I have used media tracker to add images to it like oMediaTracker.addImage( oImage, index );
    and then oMediaTracker.waitForAll();
    Java console display at client looks as follows:
    Java(TM) Plug-in: Version 1.3.1
    Using JRE version 1.3.1 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\toy
    Proxy Configuration: no proxy
    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
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Applet Initialization start...
    Applet Image Initialization start...
    Trace level set to 5: basic, net, security, ext, liveconnect ... completed.
    Opening      http:MyServer/24/x.gif
    Connecting     http:MyServer/24/x.gif with no proxy
    Connecting
    http:MyServer/24/x.gif with cookie "ASPSESSIONIDGQGQQVWC=DLNBDAOABFANEPJFFIGOOIPG;
    JSESSIONID=25Ais2tF1eBkevUhAa2akocfShzNdzyL7yC1I7UhJl7Z6BLZrnQK!
    -1149265879"
    Opening      http:MyServer/40/y.gif
    Connecting      http:MyServer/40/y.gif with no proxy
    Connecting      http:MyServer/40/y.gif with cookie "ASPSESSIONIDGQGQQVWC=DLNBDAOABFANEPJFFIGOOIPG;
    JSESSIONID=25Ais2tF1eBkevUhAa2akocfShzNdzyL7yC1I7UhJl7Z6BLZrnQK!
    -1149265879"
    Opening     http://MyServer/sun/beans/infos/PanelBeanInfo.class
    Connecting     http://MyServer/sun/beans/infos/PanelBeanInfo.class with no proxy
    Connecting http://MyServer/sun/beans/infos/PanelBeanInfo.class with cookie "ASPSESSIONIDGQGQQVWC=DLNBDAOABFANEPJFFIGOOIPG;
    JSESSIONID=25Ais2tF1eBkevUhAa2akocfShzNdzyL7yC1I7UhJl7Z6BLZrnQK!
    -1149265879"
    Opening http://MyServer/java/awt/ContainerBeanInfo.class
    Connecting http://MyServer/java/awt/ContainerBeanInfo.class with no proxy
    Connecting http://MyServer/java/awt/ContainerBeanInfo.class
    Client machine tries to access these images but i never receive a call at web server end when i see
    IIS log.
    CLient environment:
    -Windows 2000/XP/NT
    -Internet explorer 6.0 SP1 or IE 5.5 SP2
    with connection->LAN Setting->Use Automatic configuration script(only checked)
    -Java Plugin configured like proxies->Use Browser Setting
    -JDK 1.3.1 plug in at client(downloaded and Installed automatically on demand)
    -Object tag used to download applet and plugin
    -Firewall and proxy(i don't know about vendor)
    My webserver environment
    Windows 2000/iis 5.0 with anonymous authentication and
    cache-control header set to no-store (so that proxy doesn't cache anything)
    QUESTIONS:
    ~~~~~~~~~
    Q.1. When i try from home network that has a proxy then everything works fine. At client site everything except
    image download works fine. I mean jars are downloaded and i can see anything drawn using JAVA API.
    When i try from home i see following java console trace
    Java(TM) Plug-in: Version 1.3.1
    Using JRE version 1.3.1 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\wuko
    Proxy Configuration: Automatic Proxy Configuration
    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
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Trace level set to 5: basic, net, security, ext, liveconnect ... completed.
    Applet Initialization start...
    Applet Image Initialization start...
    Opening http://MyServer/24/connec.gif
    Connecting http://MyServer/24/connec.gif with proxy=197.168.1.100:808
    Connecting http://MyServer/24/connec.gif with cookie "ASPSESSIONIDQQGQQCYU=GBJFAOABCJFPDMGFHEKLDACA; JSESSIONID=26yu5m1b4upVuXoAoDmtMbWXQmetQpyzqjFANszo9vFubujT4qGX!-1149265879"
    Opening http://MyServer/24/cool.gif
    Connecting http://MyServer/24/cool.gif with proxy=197.168.1.100:808
    Connecting http://MyServer/24/cool.gif with cookie "ASPSESSIONIDQQGQQCYU=GBJFAOABCJFPDMGFHEKLDACA; JSESSIONID=26yu5m1b4upVuXoAoDmtMbWXQmetQpyzqjFANszo9vFubujT4qGX!-1149265879"
    etc
    I can't set the plugin at client to use automatic script just like IE browser uses. This option is not supported in JRE1.3.1. Looks to be supported in JRE1.4.1. My client doesn't want to set manual proxy ip and port in plugin as they don't want to reveal this info to everyone within the company for security reason.
    Q.2. Why some classes like PanelBeanInfo.class, JAppletBeanInfo.class are downloaded
    from my server while it doesn't exist at my webserver. Any thing stupid IE or plugin doing
    at client. Any Idea?
    Thanks in advance for any help.
    Ratan

    Thanks to Mike and other friends who already replied on this topic.
    Here is my research analysis:
    Answer to Question 1:
    ~~~~~~~~~~~~~~~~~~~~~
    The solution is to bundle all the images with JAR. Bundle with jar whichever needs it. However, it might require duplicacy.
    Image img = null;
    try
    img = Toolkit.getDefaultToolkit().getImage(getClass().getResource(fileName));
    catch (Exception e) { }
    In this case make sure that you have image at the same location where you access it. For example if you have to access an image in package class com.awt.ui.MyClass then your image should also be at location ..\com\awt\ui
    Note: It will require image duplicacy in your JAR but it solves the problem. It gives the advantage of fewer download from server.
    Answer to Question 2:
    ~~~~~~~~~~~~~~~~~~~~~
    IE treats applet as an active-X and try to look for these classes in your JAR. SUN has stopped its support in JDK1.3.1 and plus. What one can do is to create dummy classes with these names and bundle it with your JAR. You have to create these dummy classes if you enable Basic authentication on your web server then browser will try to look for these classes on the server and continue to prompt you for login and password. It might bother your customer un-necessarily to enter login and password too many times prompted by plug-in (plug in).
    --Ratan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Form 6i in browser not in applet viewer urgent plz

    dear fellows i have problem running form 6i on web when i click the run form web icon from form builder it opens applet viewer not browser
    and when i clik startup-program file-form 6i-run form from the web firstl i get errrcannot find the file c:'orant\tolls\web60\html\runform.htm (or one of its
    componants). Make sure the path and filename are correct and that all required libraries are available.
    if i press ok and pursu to the form and fill ins the name/passwore@service
    and press run
    then i get
    Oracle Forms Web CGI: Error detected
    Your request cannot be serviced at this time due to the following error:
    ERROR: Error getting least loaded host from Load Balancer Server.
    plz help me to run form in the browser
    i m using form 6i browser nescape
    w2k standalone.
    null

    Hi,
    Got it from metalink.oracle.com. (however..I'm afraid... you must be a partner to get in). Do not know another url, so sorry. Maybe someone else.
    Martin
    null

  • AccessControlException when run in IE or Safari, but not Applet Viewer

    My applet requires the use of a txt file as input. The txt file need only be read, and is always in the same directory as the class files and the web page the applet's running in. For a while now, there have been no problems with reading the txt file; however, recently, I've been getting a "java.security.AccessControlException: access denied (java.io.FilePermission *insert filename here* read)" error. Furthermore, this error only comes up when I run the applet in Internet Explorer or Safari; when I run it in the applet viewer, it works perfectly. On top of this, when I went to the tutorial suspecting that the problem had something to do with thread management, I noticed that all three of the applets on page http://java.sun.com/docs/books/tutorial/essential/threads/index.html of the tutorial generated errors, which may or may not indicate that the problem lies in my browsers; frankly, I'm not sure. Any help that you people can give me would be greatly appreciated!

    Applets can not read from the filesystem unless you set up policy or sign the applet (or both)
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post
    If you applet needs to read a file that is in the same location as the html file and applet why not use the
    URL object?

  • Works in applet viewer but not in internet explorer

    I origionaly posted this on devshed. I got 55 views but no replies. It seems to be a common problem to which no one knows the answer. Surprise me :O)I'm sure this is a really common but there seems to be surprisinly litttle on the web about it.
    I developed a game applet a while ago in applet viewer and am now thinking about putting it on my web site. However I have found that it doesn't work in internet explorer. I can browse other sites using Java fine. There is clearly just something about my applet that ie doesn't like.
    Does anyone have any suggestions? What sort of things upset ie?
    All help very much apreciated, you are very nice people
    Flo.

    There must be some thing that tells you it isn't working. You should tell us so we don't have to guess. Does the browser hang? Do you get an error? Did you try opening the Java Console to see if there were any messages? I am guessing that your code is using something that the security level of an Applet does not allow (but appletviewer does allow).

  • Applet works on applet viewer but not in html, why not?

    I'm using Eclipse as a development system and the Eclipse applet viewer shows my applets with no problem. They work the way I expect them to work and all is well.
    When I try to run them in Internet Explorer, I first get a security warning. OK, I trust myself, so I tell Internet Explorer to run the applet. All I get is the text "Hello Dolly", but the applet doesn't run.
    I tried refreshing it, running it again, allowing popups and opening the file, but it just won't run. What could be wrong with something so trivial?
    Any suggestions would be appreciated.
    <html>
    <head>
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Hello to Everyone</title>
    </head>
    <body>
    <applet CODE="Hello.class" width=300 height=100>Hello Dolly
    </applet>
    </body>
    </html>

    Sorry, I didn't think there was anything special in the applet.
    This just happens to be what I'm checking at the moment.
    It has changed depending upon where in the tutorial I find myself.
    Thanks for you help.
    It has to be something really stupid that I'm missing, but since I'm still new at this game, I can miss something obvious to everyone else.
    package hello;
    import java.applet.Applet;
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.Graphics;
    import java.util.Date;
    public class Hello extends Applet implements Runnable {
         private static final long serialVersionUID = 1L;
         Color colors[] = new Color[50];
         Date date1 = null;
         Thread run1 = null;
         Font f1 = new Font("Ariel", Font.PLAIN, 14);
         public void run() {
              int i = 0;
              Thread currThread = Thread.currentThread();
              while (currThread == run1) {
                   setForeground(colors);
                   repaint();
                   i++;
                   if( i>= colors.length) i = 0;
                   try { Thread.sleep(50); }
                   catch (InterruptedException e) {}
         public void init() {
              int i;
              float c = 0.0f;
              for(i=0; i<colors.length; i++) {
                   colors[i] = Color.getHSBColor(c, 1.0f, 1.0f);
                   c += 0.2f;
         public void start() {
              if (run1 == null) {
                   run1 = new Thread(this);
                   run1.start();
         public void stop() {
              run1 = null;
         public void paint(Graphics g){
              date1 = new Date();
              g.setFont(f1);
              g.drawString(date1.toString(), 10, 50);

  • Which command i use to run SWING APPLET

    Hi friends,
    i m a new in swing technology i got and problem when i run swing applet .
    i make a file and complie it with -deprecation it work and make a .class file but how can i run this applet [i use jview command , appletviewer command but it can't work]
    i hope that someone hellp me.

    Just as a matter of interest and i know its a stupid question, but did you create a html file to access the class file/jar
    Here is some example code of an applet html page
    Hope it helps...
    Also have you put it in a Jar file?
    <html>
    <head>
    <title>(Whatever title youu want)</title>
    <BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
    <TR>
    <APPLET CODE = "ClassName.class" ARCHIVE = "JarName.jar" WIDTH = "800" HEIGHT = "600"></XMP>
    <PARAM NAME = CODE VALUE = "ClassName.class" >
    <PARAM NAME = ARCHIVE VALUE = "JarName.jar" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
    <PARAM NAME="scriptable" VALUE="false">
    <dont worry about this>(they just variables for my applet)
    <PARAM NAME = SERVER_IP VALUE ="192.1.1.209">
    <PARAM NAME = SERVER_PORT VALUE =8701>
    <PARAM NAME = DEBUG VALUE =true>
    <PARAM NAME = REFRESH VALUE =10000>
    <PARAM NAME = TAIL_REFRESH VALUE =2500>
    <PARAM NAME = MESSAGE_TIMEOUT VALUE =60>
    </dont worry about this>
    </APPLET>
    </body>
    </html>

Maybe you are looking for

  • MIRO reversal split the value between GR/IR clearing and 3rd party material account

    Dear Team, We are facing the issue in MR8M for PO 4500002602; the PO has been created on 11/30/2012 in the previous fiscal year and performed the GR and IV in the 2013 fiscal year. For one GR the accounting flow is as follows: For the 3 GR's 50000137

  • How to create a field based on DFF on a Page

    Guys, I do have a page where I do have three user enterable columnn. I want to add one more column on the page that should be based on DFF using personalization. I do not want to click this column and then let it direct to some other region or page.

  • Playing Multiple Movies

    I would like to embed a flash player in a web page with one .FLV movie preloaded but without autostarting. I would then like to change the .FLV movie (and autostart) when the user clicks a button or link on the web page. How can I use Javascript to m

  • LIS Reporting of Valuated Project Stock

    We have a scenario where we have materials that are used both as valuated project stock and plant stock.  Plant stock goes to normal orders.  For the projects, the material is manufactured and goes into valuated project stock.  So the same material c

  • How can I turn off message sound at night?

    I have turned on notification sounds for arriving Mail messages using Rules.  This works fine, except that I would like to silence it at night since the sounds actually interrupt my sleep. I can do this on my Google smartphone.  Why can't I find a wa