Deploying my first JavaFX file as an Applet not working :o(

Hi guys,
basically the issue I am having is that when I run my project in NetBeans with the default setting, it runs fine, however, when I run it as a Applet, it brings up the Java loading spash image, then turns into a grey box.
I am new to JavaFX, where I work, I have written some code which generates a Gantt chart in SVG. However it has been decided as Adobe SVg is now unsupported and IE doesn't support SVG natively we have to move to an alternative. The code is written in Java to get the various data to render the Gantt chart and having read half a book on JavaFX thought I'd give JavaFX a go to try to see if I can replicate the SVG Gantt.
So this is HTML file NetBeans generates...
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>WFMT-JavaFX</title>
</head>
<body>
<h1>WFMT-JavaFX</h1>
<script src="http://dl.javafx.com/1.2/dtfx.js"></script>
<script>
    javafx(
              archive: "WFMT-JavaFX.jar",
              width: 800,
              height: 500,
              code: "com.btwholesale.wfmt.handlers.gantt.Gannt.Main",
              name: "WFMT-JavaFX"
</script>
</body>
</html>This is the WFMT-JavaFX_browser.jnlp...
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8082/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/C%3A/Projects/WFMT-JavaFX/WFMT-JavaFX/dist/" href="WFMT-JavaFX_browser.jnlp">
    <information>
        <title>WFMT-JavaFX</title>
        <vendor>701531841</vendor>
        <homepage href="http://localhost:8082/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/C%3A/Projects/WFMT-JavaFX/WFMT-JavaFX/dist/"/>
        <description>WFMT-JavaFX</description>
        <offline-allowed/>
        <shortcut>
            <desktop/>
        </shortcut>
    </information>
    <resources>
        <j2se version="1.5+"/>
        <property name="jnlp.packEnabled" value="true"/>
        <property name="jnlp.versionEnabled" value="true"/>
        <extension name="JavaFX Runtime" href="http://dl.javafx.com/1.2/javafx-rt.jnlp"/>
        <jar href="WFMT-JavaFX.jar" main="true"/>
        <jar href="lib/WFMT-UI.jar"/>
        <jar href="lib/jsf-api.jar"/>
        <jar href="lib/ojdbc14.jar"/>
        <jar href="lib/ssoRMI.jar"/>
        <jar href="lib/log4j-1.2.8.jar"/>
    </resources>
    <applet-desc name="WFMT-JavaFX" main-class="com.sun.javafx.runtime.adapter.Applet" width="800" height="500">
        <param name="MainJavaFXScript" value="com.btwholesale.wfmt.handlers.gantt.Gannt">
    </applet-desc>
    <update check="background">
</jnlp>I can't post all of the .jx as it's too many characters, but I have include a portion I think mught be the issue...
def projectId:String =  FX.getArgument("0") as String;
var ganttHelper = new GanttHelper(projectId, "wfmtsw");
var calculatedGanttData: ChartData = ganttHelper.getGanttChartData();
var tasklist: java.util.ArrayList = calculatedGanttData.getTaskLayoutData();
var calendarNodes: java.util.ArrayList = calculatedGanttData.getCalendarLayoutData();
def maxHeightScroll = (((tasklist.size() * 16) + GanttChartConstants.CALENDAR_HEADER_HEIGHT + 100) *-1) + 600;
def yScrollNeeded:Boolean = (maxHeightScroll > 0);
def maxRightScroll = GanttChartConstants.HOVER_BOX_WIDTH + 20;I included that portion as it interacts with other Java code and the examples on the web just dont do this so thought maybe this section might be causing problems for the applet, although in the jnlp file, the includes are there for the refrenced classes. Also as mentioned before, just want to re confirm that this code works fine in default mode, Java Web Start in Netbeans seems to hang although I have no need for it to work with JWS.
Any ideas what is wrong, I have been googling like mad and just can't find out what is wrong, so any help very much appriacated.
thanks,
Dale

Thanks guys its working now, funnily enough it wasn't a problem with the codebase, although I have changed that afterwards, it was the FX.getArgument bit!
So its rendering now so im happy, couple of questions more, hop you dont mind...
javafx(
archive: "WFMT-JavaFX.jar",
width: 800,
height: 500,
code: "com.btwholesale.wfmt.handlers.gantt.Gannt",
name: "WFMT-JavaFX"
1) How do I pass a parameter into this?
2) Can I specfy an ID of a DIV to load the applet into rather than in just appending to the document? I'm pretty sure I could modify the code to make it do this, but this must be a fairly common thin so I'm guessing tis already done.
Thanks
Dale

Similar Messages

  • HT1338 Application "FINDER"not responding,Desktop files disappeared & " also "Trash" not working svn after relaunching several times.

    Application "FINDER"not responding,Desktop files disappeared & " also "Trash" not working svn after relaunching several times.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left.
    Enter the name of the crashed application or process (Finder) in the Filter text field. Post the messages from the time of the last crash, if any — the text, please, not a screenshot. 
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into a message.
    Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.
    Step 2
    Still in the Console window, look under User Diagnostic Reports for crash reports related to the process. The report name starts with the name of the crashed process, and ends with ".crash". Select the most recent report and post the entire contents — again, the text, not a screenshot. In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.) Please don’t post shutdownStall, spin, or hang logs — they're very long and not helpful.

  • Ipad i have load swf file but swf  is not working proper(flex 4.6) but android is fine to work how

    ipad i have load swf file but swf  is not working proper(flex 4.6) but android is fine to work how

    On the MBP, in iTunes, switch to Song view and enable the iCloud Status column by pulling down View > View options and selecting the option for "iCloud Status." Close the small window. Look for any tracks that have a status of "waiting." If you see several of them disable iTunes Match while holding down the Option key. Quit iTunes, wait a few seconds, then open it again and turn iTM back on. Let it compelete the scan. Wait until all tracks that are "waiting" have a status of either "matched" or "uploaded."
    On the iPad, turn off iTunes Match then launch the Music app and let the contents clear out. Power cycle the iPad for good measure, then re-enable the service once all the tracks in iTunes have been processed.

  • File type associations is not working in the App-V 4.6 SP3

    Hello,
    I found issue, that file type associations is not working in App-V 4.6 SP3. When I try to open associated file with double click I receive next window:
    Translate: This action is only valid for products that are currently installed.
    I have checked associations in App-V Console and in OSD file, everything looks like OK.
    Maybe someone has some ideas?
    Could you please share them with me?
    Thank you in advance.

    Is this only happening on one client machine? If so can you completely clear the application and re-stream\cache it again?
    If that fails, you could try to create the FTA locally on the client
    PLEASE MARK ANY ANSWERS TO HELP OTHERS Blog:
    rorymon.com Twitter: @Rorymon

  • Java applet not working savevid keepvid

    Hi all,
    I'm sure I'm not the only one who has been confounded by Java applets not working in certain download web services; in my case, keepvid.com and savevid.com to download copies of youtube videos.  It has been a huge headache and even debilitating in my case.  I teach film and video to middle schoolers, and we often use youtube as a resource for our class projects. 
    I found a solution today, I think, and wanted to share it:
    I installed the browser called "Torch" and it seems to work fine, so far.

    thanx 4 replying
    using the browser to view Applet is not recomended that is because if u change the the source-code and recompile the applet then run it using the broswer it will run the old-version
    Also i've found the solution here
    http://www.cs.utah.edu/classes/cs1021/notes/lecture03/eclipse_help.html

  • I am trying to change the date on an imported home video clip. I entered 9/7/2012 and got 6/9/0339! I checked modify original file, but it is not working. Any ideas?

    I am trying to change the date on an imported home video clip. I entered 9/7/2012 and got 6/9/0339! I checked modify original file, but it is not working. Any ideas?

    Are you using the Adjust Date and Time option or the Batch Change option?  If it's the former try the latter.  If you get the same results  launch iPhoto with the Option key held down and create a new, test library.  Import  the same video file and check to see if the same problem persists.
    OT

  • I have mp4 videos on my computer that I want to add to itunes...the add a file or folder is not working. Why?

    I have mp4 videos on my computer that I want to add to itunes...the add a file or folder is not working. Why?

    wait until, Apple fixes it

  • I downloaded the latest firefox 4 and updated my file, firefox 4 will not work with my version of Mac OS X, how do I get my old firefox back?

    I downloaded the latest firefox 4 and updated my file, firefox 4 will not work with my version of Mac OS X, how do I get my old firefox back?

    You can get Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html

  • Added preset motions to my interactive pdf file. It's not working when I export my file as an inter

    I added preset motions to my interactive pdf file. It's not working when I export my file as an interactive pdf. It's working when I play it on the Preview panel. I must not be doing something right. Does anybody have any clue what I need to do to have my presets motions work when played on Acrobat

    So do you mean export the whole document in a swf file format and then bring the whole swf file in and save it as a pdf file.  Is there way to export these motion presets seperately and bring them back into Indesign. I wish it was less difficult but I guess there is no way around it for the time being.

  • Installing Java 7 from Oracle just made Applets not work, how to fix

    Mac 10.7.4. I tried installing Java 7 from Oracle, but all it did was remove half the prefs from Java and make Applets not work. How do I revert/reinstall Java?

    Here you go!
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Swing components in applet not working in web browser

    Hi Guys,
    I've created an applet which makes use of some swing components, but unfortunately, not all of them function properly in my web browser (internet explorer or Mozilla Firefox). Its mainly the buttons; the last buttons works and displays the correct file within the broswer, but the first 5 buttons do not work...
    any help please on how I can sort this problem out?
    Heres the code for my applet:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.applet.*;
    public class MainAppWindow extends JApplet
    int gapBetweenButtons = 5;
    final JPanel displayPanel = new JPanel(new BorderLayout());
    public void init()
       //Panel for overall display in applet window.
       JPanel mainPanel = new JPanel(new BorderLayout());
       mainPanel.add(new JLabel(new ImageIcon(getClass().getResource("images/smalllogo2.gif"))),BorderLayout.NORTH);
       //sub mainPanel which holds all mainPanels together.
       JPanel holdingPanel = new JPanel(new BorderLayout());
       //Panel for displaying all slide show and applications in.
       displayPanel.setBackground(Color.white);
       displayPanel.add(new JLabel(new ImageIcon(getClass().getResource("images/IntroPage.jpg"))),BorderLayout.CENTER);
       displayPanel.setPreferredSize(new Dimension(590,400));
       JPanel buttonPanel = new JPanel(new GridLayout(6,1,0,gapBetweenButtons));
       buttonPanel.setBackground(Color.white);
       JButton button1 = new JButton("User guide");
       button1.addActionListener(
         new ActionListener() {
              public void actionPerformed(ActionEvent e)
                   if(displayPanel.getComponents().length > 0)displayPanel.removeAll(); // If there are any components in the mainPanel, remove them and then add label
                   displayPanel.setBackground(Color.white);
                   displayPanel.add(new JLabel(new ImageIcon("images/UserGuide.jpg")));
                   displayPanel.revalidate(); // Validates displayPanel to allow changes to occur onto it, allowing to add different number images/applicaions to it.
       JButton button2 = new JButton("What is a Stack?");
       button2.addActionListener(
       new ActionListener() {
               public void actionPerformed(ActionEvent e)
                   if(displayPanel.getComponents().length > 0)displayPanel.removeAll();
                   displayPanel.setBackground(Color.white);
                   displayPanel.add(new JLabel(new ImageIcon("images/WhatIsAStack.jpg")));
                   displayPanel.revalidate();
       JButton button3 = new JButton("STACK(ADT)");
       button3.addActionListener(
       new ActionListener() {
             public void actionPerformed(ActionEvent e)
                   if(displayPanel.getComponents().length > 0)displayPanel.removeAll();
                   displayPanel.setBackground(Color.white);
                   displayPanel.add(new JLabel(new ImageIcon("images/StackADT.jpg")));
                   displayPanel.revalidate();
       JButton button4 = new JButton("Stacks in the Real World");
       button4.addActionListener(
       new ActionListener() {
             public void actionPerformed(ActionEvent e)
                   if(displayPanel.getComponents().length > 0)displayPanel.removeAll();
                   displayPanel.setBackground(Color.white);
                   displayPanel.add(new JLabel(new ImageIcon("images/StacksInTheRealWorld.jpg")));
                   displayPanel.revalidate();
       JButton button5 = new JButton("DEMONSTRATION");
       button5.addActionListener(
       new ActionListener() {
             public void actionPerformed(ActionEvent e)
                 if(displayPanel.getComponents().length > 0)displayPanel.removeAll();
                 Demonstration app = new Demonstration();
                 JPanel appPanel = app.createComponents();//gets the created components from Demonstration application.
                 appPanel.setBackground(Color.pink);
               displayPanel.add(appPanel);
               displayPanel.revalidate();
       JButton button6 = new JButton("Towers Of Hanoi");
       button6.addActionListener(
       new ActionListener() {
             public void actionPerformed(ActionEvent e)
                     if(displayPanel.getComponents().length > 0)displayPanel.removeAll();
                     TowerOfHanoi app = new TowerOfHanoi();
                     JPanel appPanel = app.createComponents();//gets the created components from Towers of Hanoi
                     JPanel mainPanel = new JPanel();//panel used to centralise the application in center
                     mainPanel.add(appPanel);
                     mainPanel.setBackground(Color.pink); //sets mainPanel's background color for 'Towers Of Hanoi'
                     displayPanel.add(mainPanel);
                     displayPanel.revalidate();
       //adding buttons to the buttonPanel.
       buttonPanel.add(button1);
       buttonPanel.add(button2);
       buttonPanel.add(button3);
       buttonPanel.add(button4);
       buttonPanel.add(button5);
       buttonPanel.add(button6);
       JPanel p = new JPanel(); // Used so that the buttons maintain their default shape
       p.setBackground(Color.white);
       p.add(buttonPanel);
       holdingPanel.add(p,BorderLayout.WEST);
       holdingPanel.add(displayPanel,BorderLayout.CENTER);
       //Positioning of holdingPanel in mainPanel.
       mainPanel.add(holdingPanel,BorderLayout.CENTER);
       //indent mainPanel so that its not touching the applet window frame.
       mainPanel.setBorder(BorderFactory.createEmptyBorder(10,20,10,20));
       mainPanel.setBackground(Color.white);
       mainPanel.setPreferredSize(new Dimension(850,600)); //size of applet window
       mainPanel.setOpaque(false); // Needed for Applet
       this.setContentPane(mainPanel);
    }

    Thanks for the response. I don't quite understand what you're talking about though. I have, in my humble knowledge, done nothing with packages. I have put the applet class (WiaRekenToolActiz.class is the applet class) in the jar file wia_actiz_archive.jar. From what I read on the tutorial, java looks for the applet class in all the jar files specified. Since I put my CODEBASE as the main url, I thought it baiscally didn't matter where you out the html file.
    I shall include the complete html page complete with applet tag to perhaps illuminate a bit more what I mean...
    <html>
    <head>
    <title>Wia Rekenmodule hello!</title>
    </head>
    <body bgcolor="#C0C0C0">
    <applet
    CODEBASE= "http://www.creativemathsolutions.nl/test"
    ARCHIVE= "Actiz/wia_actiz_archive.jar, Generic/wia_archive.jar"
    CODE="WiaRekenToolActiz.class" 
    WIDTH=915 HEIGHT=555
    >
    <PARAM NAME = naam VALUE = "Piet Janssen">
    <PARAM NAME = gebdag VALUE = "01">
    <PARAM NAME = gebmaand VALUE = "06">
    <PARAM NAME = gebjaar VALUE = "1970">
    <PARAM NAME = geslacht VALUE = "man">
    <PARAM NAME = dienstjaren VALUE = "10">
    <PARAM NAME = salaris VALUE = "56500">
    <PARAM NAME = deeltijdpercentage VALUE = "100">
    <PARAM NAME = accountnaam VALUE = "Zorginstelling 'De Zonnebloem'">
    </applet>
    </body>
    </html>

  • Applets not working with Java 1.7.0_51 in MII 14.0 SP4 Patch 5

    Hi,
    I'm currently evaluating the migration of our MII 12.0 developments to MII 14.
    But I'm running in several issues just trying to use simple things like a SQL query template with an iGrid Display template in test mode.
    Used versions are: MII 14.0 SP4 Patch 5 and on client side the latest Mozilla Firefox with Java 1.7.0_51
    At first I always get a java security warning when the applet is being loaded about unsigned applications.
    At second the applet itself is not running. It always shows "No data available" and the java console shows the following errors (iResult is the id of the applet):
    iResult [ERROR] - Couldn't set query template: No Query Defined
    iResult [ERROR] - Couldn't set display template: null
    iResult [ERROR] - Couldn't set display template: null
    Is this perhaps a general problem, that the MII applets are not working with Java 1.7.x versions?
    If I call the same MII page from a client with Java 1.6.x it is working without errors.
    Do you have some suggestions for me?
    Regards Timo

    please clear your JAVA Cache. that should solve the JRE issue. thanks

  • Applet Not Working in Browser

    I built a java applet that works fine in the applet viewer, but just appears as a gray screen in a web browser. In the status bar of the web browser, it says that the applet has been started. The only possible cause of this that I can think of is a failure to connect to the internet. The program should appear like that if it fails to connect to the internet when it first starts. If this is the problem, please see my other post about making that work.
    http://forum.java.sun.com/thread.jsp?forum=31&thread=449444&tstart=0&trange=15

    1) What Browser?
    2) What is you code?
    1) If it is Internet Explorer, the problem would be an outdated JVM. MS JVM only supports up to Java 1.1.8 so you would have to rework your Applet to fit with just those classes/methods present at that time (ie no Swing, and check the APIs to make sure that the since version isn't past 1.1.
    If you are using other browsers, the old JVM may be a problem as well. It should be easy enough to install the latest one.
    2) Start out with something simple, like a hello world. Get that to work, then worry about the more complicated stuff.

  • File copy in KM not working from a par file.

    Hi Experts,
                      We created a par file which will copy a file from a folder and copy this onto a seperate folder under the same parent folder. This applications works well on testing system, but is not working when deployed to the portal server where it supposed to work.
    Please give your thoughts and your valuable suggestions on this issue.
    Thanks in advace
    Sateesh

    Hi Raghu,
                   What is CM system and where it needs to be added.
    I am copying the code please check and give your valuable inputs.
    import java.util.Properties;
    import com.sap.tc.logging.FileLog;
    import com.sap.tc.logging.Severity;
    import com.sap.tc.logging.TraceFormatter;
    import com.sapportals.wcm.repository.CopyParameter;
    import com.sapportals.wcm.repository.ICollection;
    import com.sapportals.wcm.repository.ICopyParameter;
    import com.sapportals.wcm.repository.IResourceList;
    import com.sapportals.wcm.repository.ResourceContext;
    import com.sapportals.wcm.repository.ResourceFactory;
    import com.sapportals.wcm.service.scheduler.ISchedulerTask;
    import com.sapportals.wcm.util.uri.RID;
    import com.sapportals.wcm.util.usermanagement.WPUMFactory;
    public class archiveContent implements ISchedulerTask {
         private static final com.sap.tc.logging.Location logger =
              com.sap.tc.logging.Location.getLocation("KMScheduler");
      public void run( String id, Properties properties ) {
         // implement the tasks to be scheduled
         logger.setEffectiveSeverity(Severity.ALL);
         FileLog mFile1 = new FileLog("/usr/sap/EPD/JC00/j2ee/cluster/server0/log/KMScheduler/reportArchiver.log",10485760,5,new TraceFormatter("%d %m"));
         logger.addLog(mFile1);
         String Filename=null;
         int flag=0;
         logger.infoT("Entering Archive Application try block");
         try{
         com.sapportals.portal.security.usermanagement.IUser epUser = WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");
         ResourceContext ctx = new ResourceContext(epUser);
    //     Get the path of the bi-broadcast (start) folder and create a resource
         //RID birid = RID.getRID("/bi-broadcast");
         RID birid = RID.getRID("/documents/KMScheduler_test");
    //     Create resource holding the contents of the bi-broadcast/top level folder
         com.sapportals.wcm.repository.IResource bires= ResourceFactory.getInstance().getResource(birid,ctx);
         if(bires!=null)
    //          Create a collection of the bi-broadcast resource and get the child resources i.e. Categories
              ICollection categorycollection=(ICollection)bires;
              IResourceList categorylst= categorycollection.getChildren();                                             
              com.sapportals.wcm.repository.IResource categoryres = null;
              if(categorylst!=null)
                   for(int i=0;i<categorylst.size();i++)
                        categoryres = categorylst.get(i);
    //                    Check if the Category is Template. if it is do not enter the loop
                        //if(!categoryres.getName().equalsIgnoreCase("Template"))          
    //                         Get the path of the Category folder
                             //RID categoryrid = RID.getRID("/bi-broadcast/"+categoryres.getName());
                             //RID categoryrid = RID.getRID("/documents/KMScheduler_test/bi_reports/"+categoryres.getName());
                             //logger.infoT("Folder ""\"/documents/KMScheduler_test/bi_reports/"categoryres.getName()+"\" detected");
                             if(categoryres!=null)
    //                              Create a collection of the Category resource and get the child resources i.e. Area      
                                  ICollection areacollection=(ICollection)categoryres;
                                  IResourceList arealst= areacollection.getChildren();                                                            
                                  com.sapportals.wcm.repository.IResource areares = null;     
                                  if(arealst!=null)
                                       for(int j=0;j<arealst.size();j++)
                                            areares=arealst.get(j);
                                            Filename=areares.getName();                              
    //                                        Get the path of the Area folder
                                            RID arearid = RID.getRID("/documents/KMScheduler_test/"categoryres.getName()"/"+areares.getName());
                                            logger.infoT("Folder ""\"/documents/KMScheduler_test/"categoryres.getName()"/"areares.getName()+"\" detected");
                                            if(areares!=null)
    //                                             Create a collection of the Area resource and get the child resources i.e. Region
                                                 ICollection regioncollection=(ICollection)areares;
                                                 IResourceList regionlst= regioncollection.getChildren();                                        
                                                 com.sapportals.wcm.repository.IResource regionres = null;     
                                                 if(regionlst!=null)
                                                      for(int k=0;k<regionlst.size();k++)
                                                           regionres=regionlst.get(k);
                                                           Filename=regionres.getName();
    //                                                       Get the path of the Region folder
                                                           RID regionrid = RID.getRID("/documents/KMScheduler_test/"categoryres.getName()"/"areares.getName()"/"+regionres.getName());
                                                           logger.infoT("Folder ""\"/documents/KMScheduler_test/"categoryres.getName()"/"areares.getName()"/"regionres.getName()+"\" detected");
                                                           if(regionres!=null)
    //                                                       Create a collection of the Region resource and get the child resources i.e. File
                                                                ICollection filecollection=(ICollection)regionres;
                                                                IResourceList filelst= filecollection.getChildren();                                             
                                                                com.sapportals.wcm.repository.IResource fileres = null;     
                                                                if(filelst!=null)
                                                                     for(int l=0;l<filelst.size();l++)
                                                                          fileres=filelst.get(l);
    //                                                                      Check if the file is Archive or Special. if it is don not move it to Archive
                                                                          if(!fileres.getName().equalsIgnoreCase("Archive"))
                                                                               if(!fileres.getName().equalsIgnoreCase("Special"))
                                                                                    flag=1;
    //                                                                                Get the path of the File in the region folder
                                                                                    RID filerid = RID.getRID("/documents/KMScheduler_test/"categoryres.getName()"/"areares.getName()"/"regionres.getName()"/Archive/"+fileres.getName());
                                                                                    logger.infoT("File ""\"/documents/KMScheduler_test/"categoryres.getName()"/"areares.getName()"/"regionres.getName()"/Archive/"fileres.getName()+"\" detected");                                                                                                              
    //                                                                                Move one child at a time to the Archive folder
                                                                                    ICopyParameter cp=new CopyParameter(true);
                                                                                    fileres.move(filerid,cp);
                                                                                    logger.infoT("Archiving file \""fileres.getName()" from folder /documents/KMScheduler_test/"categoryres.getName()"/"areares.getName()"/"regionres.getName()"\"");
                                                                               else if(fileres.getName().equalsIgnoreCase("Special"))
                                                                                    RID ar_analysisrid=RID.getRID("/documents/KMScheduler_test/"categoryres.getName()"/"areares.getName()"/"regionres.getName()"/Special");
                                                                                    ICollection aranaylsiscollection=(ICollection)fileres;
                                                                                    IResourceList aranalysislst= aranaylsiscollection.getChildren();                                             
                                                                                    com.sapportals.wcm.repository.IResource aranalysisres = null;
                                                                                    if(aranalysislst!=null)
                                                                                         for(int m=0;m<aranalysislst.size();m++)
                                                                                              aranalysisres=aranalysislst.get(m);
                                                                                              if(!aranalysisres.getName().equalsIgnoreCase("Archive"))
                                                                                                        flag=1;
    //                                                                                                    Get the path of the File in the region folder
                                                                                                        RID arfilerid = RID.getRID("/documents/KMScheduler_test/"categoryres.getName()"/"areares.getName()"/"regionres.getName()"/Special/Archive/"+aranalysisres.getName());
                                                                                                        logger.infoT("File ""\"/documents/KMScheduler_test/"categoryres.getName()"/"areares.getName()"/"regionres.getName()"/Special/Archive/"aranalysisres.getName()+"\" detected in Special folder");
    //                                                                                                    Move one child at a time to the Archive folder
                                                                                                        ICopyParameter cp=new CopyParameter(true);
                                                                                                        aranalysisres.move(arfilerid,cp);
                                                                                                        logger.infoT("Archiving file \""fileres.getName()" from folder /documents/KMScheduler_test/"categoryres.getName()"/"areares.getName()"/"regionres.getName()"/Special/Archive/"aranalysisres.getName()"\"");
    Edited by: Jabi123 on Jan 17, 2011 7:13 AM

  • Applet not Working.Why???

    I have written an applet program but it does not work
    It works when i did it as an application.
    I have installed JAVA plug in.The HTML and Applet codes
    are in the same directory as JDK
    The web browser comes up with a grey area & the following messages:
    Exception:java.lang.ClassNotFoundException:testing4.class
    (on the grey area)
    Applet testing4 not loaded (at the bottom of the browser)
    Why is this so?
    The code i have used are as follows:
    HTML CODE
    <html>
    <title>LPC
    </title>
    <applet code="testing4.class"  width=400 height=110>
    </applet>
    </html>APPLET PROGRAM CODE
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    //import java.lang.Object;
    public class testing4 extends JApplet
    { private JTextArea display;
      private JScrollPane scrollPane2;
      private JButton paste;
      private JPanel P2;
      private File fileName;
      public void init()
        paste=new JButton("paste");
        paste.setMinimumSize(new Dimension(90,20));
        paste.setPreferredSize(new Dimension(90,20));
        paste.setMaximumSize(new Dimension(90,20));
        copyhandler pa=new copyhandler();
        paste.addActionListener(pa);
        display=new JTextArea();
        scrollPane2=new JScrollPane(display);
        scrollPane2.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane2.setMinimumSize(new Dimension(200,58));
        scrollPane2.setPreferredSize(new Dimension(200,58));
        scrollPane2.setMaximumSize(new Dimension(200,58));
        P2=new JPanel();
        P2.setMinimumSize(new Dimension(200,80));
        P2.setPreferredSize(new Dimension(200,80));
        P2.setMaximumSize(new Dimension(200,80));
        P2.setLayout(new BoxLayout(P2,BoxLayout.Y_AXIS));
        scrollPane2.setAlignmentX (Component.LEFT_ALIGNMENT);
        P2.add(scrollPane2);
        paste.setAlignmentX(Component.LEFT_ALIGNMENT);
        P2.add(paste);
       Container c=getContentPane();
        c.add(P2);
       //COPIES TEXT FROM FILE ON MY DISK TO THE TEXTAREA
       private class copyhandler implements ActionListener
       { public void actionPerformed(ActionEvent event)
         { JFileChooser fileChooser = new JFileChooser();
           fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY );
           int result = fileChooser.showOpenDialog(testing4.this);
           // user clicked Cancel button on dialog
           if ( result == JFileChooser.CANCEL_OPTION )
             return;
           fileName = fileChooser.getSelectedFile();
           if ( fileName == null ||
              fileName.getName().equals( "" ) )
           JOptionPane.showMessageDialog( null,"Invalid File Name",
                                            "Invalid File Name",
                                          JOptionPane.ERROR_MESSAGE );
           else
           { try
             { FileReader in = new FileReader(fileName);
               BufferedReader reading= new BufferedReader(in);
               String store="";
               while (reading.ready())
               { StringTokenizer st = new StringTokenizer(reading.readLine());
                 store=store+st.nextToken()+"\n";
               display.setText(store);
             catch ( IOException e )
             { JOptionPane.showMessageDialog( null,
                                          "Error Opening File", "Error",
                                          JOptionPane.ERROR_MESSAGE );
      public static void main (String [] args)
      { testing4 done =new testing4();
        JFrame frame = new JFrame("testing");
        frame.addWindowListener(new WindowAdapter()
                                 public void windowClosing(WindowEvent e)
                                   System.exit(0);
        done.init();
        frame.getContentPane().add(done);
        frame.pack();
        frame.setSize(205,110);
        frame.setVisible(true);
    }

    It Still giving a blank page.
    New Code
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    //import java.lang.Object;
    public class testing4 extends JApplet
    { private JTextArea display;
      private JScrollPane scrollPane2;
      private JButton paste;
      private JPanel P2;
      private File fileName;
      public void init()
        paste=new JButton("paste");
        paste.setMinimumSize(new Dimension(90,20));
        paste.setPreferredSize(new Dimension(90,20));
        paste.setMaximumSize(new Dimension(90,20));
        copyhandler pa=new copyhandler();
        paste.addActionListener(pa);
        display=new JTextArea();
        scrollPane2=new JScrollPane(display);
        scrollPane2.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane2.setMinimumSize(new Dimension(200,58));
        scrollPane2.setPreferredSize(new Dimension(200,58));
        scrollPane2.setMaximumSize(new Dimension(200,58));
        P2=new JPanel();
        P2.setMinimumSize(new Dimension(200,80));
        P2.setPreferredSize(new Dimension(200,80));
        P2.setMaximumSize(new Dimension(200,80));
        P2.setLayout(new BoxLayout(P2,BoxLayout.Y_AXIS));
        scrollPane2.setAlignmentX (Component.LEFT_ALIGNMENT);
        P2.add(scrollPane2);
        paste.setAlignmentX(Component.LEFT_ALIGNMENT);
        P2.add(paste);
       Container c=getContentPane();
        c.add(P2);
       //COPIES TEXT FROM FILE ON MY DISK TO THE TEXTAREA
       private class copyhandler implements ActionListener
       { public void actionPerformed(ActionEvent event)
         { JFileChooser fileChooser = new JFileChooser();
           fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY );
           int result = fileChooser.showOpenDialog(testing4.this);
           // user clicked Cancel button on dialog
           if ( result == JFileChooser.CANCEL_OPTION )
             return;
           fileName = fileChooser.getSelectedFile();
           if ( fileName == null ||
              fileName.getName().equals( "" ) )
           JOptionPane.showMessageDialog( null,"Invalid File Name",
                                            "Invalid File Name",
                                          JOptionPane.ERROR_MESSAGE );
           else
           { try
             { FileReader in = new FileReader(fileName);
               BufferedReader reading= new BufferedReader(in);
               String store="";
               while (reading.ready())
               { StringTokenizer st = new StringTokenizer(reading.readLine());
                 store=store+st.nextToken()+"\n";
               display.setText(store);
             catch ( IOException e )
             { JOptionPane.showMessageDialog( null,
                                          "Error Opening File", "Error",
                                          JOptionPane.ERROR_MESSAGE );
      public static void main (String [] args)
      { testing4 done =new testing4();
        //you did not set applet's width and height:
        //applet is a container too
        done.setWidth(205);
        done.setHeight(110);
        JFrame frame = new JFrame("testing");
        frame.addWindowListener(new WindowAdapter()
                                  public void windowClosing(WindowEvent e)
                                  { System.exit(0);
        done.init();
        frame.getContentPane().add(done);
        frame.pack();
        frame.setSize(205,110);
        frame.setVisible(true);
    }

Maybe you are looking for