Using visual library in java applet

Hi,
I try to develop an web application which is use the java applet. So, I just want to ask, is it possible to use the netbeans visual library in the java applet? If not, which library must be used this kind of appliacation and what is the efficent developmen environment (netbeans, java studio creator ?)
best regards,
Ufuk Utku Turuncoglu
ITU, Informatics Institute
HPC Lab

Add org-netbeans-api-visual.jar into your jar/classpath and you should be
OK assuming your Applet is signed/jar packed, you will have to jump through
some hoops to get rg-netbeans-api-visual.jar accessible from your main
jar.
Namely....
class YourClass
void copyResourceFromJarToExtDir(String tResource)
InputStream dllInputStream = getClass().getClassLoader().getResourceAsStream(tResource);
fileSeparator = System.getProperty("file.separator").charAt(0);
String extDir = System.getProperty("java.home")+fileSeparator+"lib"+fileSeparator+"ext";
File outFile = null;
   try
      BufferedInputStream  binStream  = new BufferedInputStream(dllInputStream);
      outFile = new File(extDir+fileSeparator+tResource);
      BufferedOutputStream boutStream = new BufferedOutputStream(new FileOutputStream(outFile));
      System.out.println("saveing to"+outFile.toString());
      int b = -1;
      while((b = binStream.read()) != -1)
         boutStream.write(b);
      binStream.close();
      binStream.close();
      boutStream.flush();
      boutStream.close();
   catch(Exception e)
       e.printStackTrace();
}To summarize pack the rg-netbeans-api-visual.jar into your Applets main jar and call copyResourceFromJarToExtDir("rg-netbeans-api-visual.jar");
In your Applet.init() and you will be able to access the rg-netbeans-api-visual.jar
directly.
Good Luck!
(T)

Similar Messages

  • How open a report with Viewer 2008 without using Visual Studio and Java

    Hi,
    There is a way to open a report (with parameters) save in a web server with Crystal Report Viewer 2008 without using Visual Studio or Java ?
    I've an asp page and i want to open this report using some command (I know asp, vbscript and html)
    In the past it was very easy because we use CR 9, but now it's already many days im looking for a solution but seem impossible.
    I know the craxdrt.dll is not included with Crystal Reports 2008.
    It seem me i can use OpenDocument, but i'm not sure. Someone has some easy example to help me ?
    Remember i have only Crystal report viewer 2008 on the server and on the clients.
    Thanks in advance

    If you are looking to create a web application or view report through a web server using only Crystal Reports then you do have to either use Java, or .NET.
    If you have Crystal Reports server or Business Objects Enterprise you can use OpenDocument to view managed reports but this does require one of our server products.
    Trevor.

  • How to use C-Structure in java applets

    hi alls,
    I want to use a struct model (struct in C++) in java applets. i know class is used in java applications. but, how can i convert in java applets?
    class renk
    int r;
    int gr;
    int b;
    import java.awt.Graphics;
    import java.awt.Color;
    import java.awt.Event;
    import java.applet.Applet;
    public class benek extends Applet
    final int n=10;
    int x[] = new int[n];
    int y[] = new int[n];
    int count = 0;
    renk clr[] = new renk[n];
    public void init()
    setBackground(Color.black);
    public boolean mouseDown(Event yordam, int xyer, int yyer)
    if (count<n)
    System.out.println("...");
    ekle(xyer,yyer);
    else System.out.println("Kapasite Doldu...");
    return true;
    void ekle(int xyer, int yyer)
    int r1 = (int)Math.floor(Math.random()*256);
    int gr1 = (int)Math.floor(Math.random()*256);
    int b1 = (int)Math.floor(Math.random()*256);
    clr[count].r = r1;
    clr[count].gr = gr1;
    clr[count].b = b1;
    x[count]=xyer;
    y[count]=yyer;
    count++;
    repaint();
    public void paint(Graphics g)
    it gives error message... how can � use struct model in java applets???
    if you help me i will be greatfull....

    � use import but it doesn't work.
    i add: import renk; or import class renk;
    how will � add import I assumed based on your initial post that the renk and benek classes were in the same file. Apparently you're saying they are not. So for another thing, make your renk class "public class renk", and add the "public" keyword to the 3 members of that class. Then if your code still doesn't see the "renk" class, it would just be that you don't have the directory that contains the compiled "renk.class" in your classpath.

  • How use the jtable in java applete

    hi master
    sorry i again Disturb you
    sir pleae give me idea how i use the jtable in java applete
    please send me code
    thank's
    aamir

    Hi,
    see http://www.exampledepot.com/
    Frank

  • How to Use DLL Function in Java Applet

    Hi all,
    I have been assigned a task to develop java applet. The problem is, I need to use DLL functions in my applet to read records. Could you pls anyone guide me how to interface DLL and applet to read records with sample code?
    I'm using JDK 1.5.0_06 and Windows XP OS. thanx..
    best rgds,
    jpdbay

    You will need to use Java Native Interface JNI. Ther are many posts on the subject, please search, and this is the documentation:
    http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html

  • How to process (populate & merge) XFA PDF Forms using Adobe library in Java

    We have the XFA Forms (.pdf) created in Adobe LiveCycle designer 8.2 ES. We have the following requirement :
    1. We need to populate data in those forms using standalone Java programs.
    2. We need to merge the populated forms and create a single PDF out of these forms, using standalone Java programs.
    Can both of these be done using Adobe PDF Library or Acrobat SDK?
    What is the difference between Adobe PDF Library or Acrobat SDK?
    We already have the licensed version of Adobe Acrobat Professional 9 with LiveCycle Designer 8.2 ES. Where can I get the relevant Adobe Java APIs from?
    Can someone provide some sample code that could be used for the above requirements?
    Please provide your inputs on these. We have been using IText, but facing some limitations in that recently.

    The answer looks quite clear, and the conclusion is essentially simple: Don't use LiveCycle Designer.
    Keep in mind that LiveCycle Designer originated as design tool for the according servers (that's way back in JetForms's days). For reasons I still can follow, Adobe decided to thow this design tool after any Acrobat Pro for Windows buyer. And the forms industry is now suffering from the mess that created.
    Also, keep in mind that the term "Server" is used here as "service providing application".
    Rants aside, was there a specific feature making you chose XFA (aka LiveCycle Designer)? Knowing these reasons can help us finding suitable workarounds.
    HTH.
    Max Wyss.

  • How to use HTML parameters in Java applet

    Hello
    In perl I have created a form with things like a selectiuon box called currency and text fields called product for example. Then when I click submit the perl program can pick up the currency and product parameters.
    I have read about applet param eg <param name="param1" value="Apple"> is this the same thing? Or is it different?
    Can I use HTML parameters or do I need to use applet param? I am confused.
    If applet param is what I need, then how do I change the param values say by editing text in a text field?

    You will need to use Java Native Interface JNI. Ther are many posts on the subject, please search, and this is the documentation:
    http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html

  • Using C++ Library in Java

    Hi,
    How do I use a prewritten C++ API in Java? With C++ I have to use the include files that came with the DLL. I have no access to the code. I'd appreciate reasonably extensible code examples.
    Thanks.

    You can use JNI(Java Native Interface) to solve this problem.
    I give an example below, you can do advanced functions in depth.
    First, write a simle class named Test, it contains one method called getSquare which pass a int argument only. Of course It contains the program entry.
    public class Test
    public static void main(String args[])
    //import dll and print returned result
    try{
    System.loadLibrary("Test.dll"); //we will name the compiled program as "Test.dll"
    }catch(Exception e){}
    System.out.println(Test.getSquare(5));
    public static native int getSquare(int num);
    As you can see, It is very easy. You need native method to access functions which wrote in C or C++. The native method like abstract do not have method body, it has signature only, we will write method body in other programming language such as C or C++.
    Next step, likes we did normal, compile it(javac Test.java), then we will use JNI compiler tool which in Java bin directory compile the Test class(javah Test), note never specify the suffix ".class" or ".java". After the command executed, you will find Test.h in the same directory. That is, it is the header file of C or C++, it is the code skeleton, next step we will write function body.
    You may complain the function's signature is too long to rember, don't worry, it is needless, just copy it to your C file or C++ file, then imply it. here the fountion returns the square of the argument.
    JNICALL jint methodSignature(JNIEnv *env,jint arg)
    return arg*arg;
    Excuse me, I forget the functionsignature too, but there is a rule with it, so replace it in any signature(when you coding, never change the signature, it was created by compiler automatically).
    At this step(imply the function), you can do as you like include invoke dlls, execute applications even thougn win32 founctions. Note, there are too many data types(jint, jshort,jstring), functions and structs and pointers defined in JNI environment, you must know the change C or C++ type to java types. If you know much about C or C++ and Java, you can read jni.h file which in Java include directory, it is important to read books or articles about JNI.
    compile the code, name it with "Test.dll"
    Execute your java class, what did you find?

  • How i use java applet data grid i have many record i need show in grid

    hi master
    sir i have many record i want show all record in applet grid how i use grid in applet
    please send me sample code of java class how send many record to grid and applet code how use applet grid
    thanks
    aamir

    Duplicate post:
    how use the jtable in java applete
    Aamir,
    If you use JApplet then you can use JTable. Just do an Internet search for "JTable" and "applet".
    Good Luck,
    Avi.

  • Using a java applet as form

    hi there,
    I'm new to programming applets (but not new to java and gui programming).
    Here's my question:
    I would like to use a java applet with a textfield as form input. is this possible?
    I see some several advantages over using standard html textfields and java script. (f.e.: I can set the cursor to any position after changing the text in the field).
    I'm thinking on a solution by my own. Would it be possible to use a java script method to access a property from the applet? so I could use a combination of java applet, html and java script. On the onClick() event I read the actual value from the applet and do some normal post request. Any better suggestions?
    thx
    soa

    I want to write the textfield in java. So I use the applet as form.
    What would be your suggestion?
    Write an applet with an textfield and and getValue() method? So I could create a normal html button and use javascript to write a method wich acces this getmethod. So I could register this method to the onClick() event.

  • How to get started on java applet client/server game?

    Hi,
    I've googled, but didn't find any useful information about creating java applet client/server game. I've followed the example of Client/Server Tic-Tac-Toe Using a Multithreaded Server in Java How to Program from Deitel, but I when I tried on Applet, my cliet doesn't communicate with the server at all. Any help to get started with Applet would be great. Thanks!

    well, i decided to put in portion of my codes to see if anyone can help me out. the problem I have here is the function excute() never gets called. here is my coding, see if you can help. Notice, I'm running this on Applet thru html page. This shouldn't be much different than running JFrame in term of coding right?
    Server.java
        public void init()
            runGame = Executors.newFixedThreadPool(2);
            gameLock = new ReentrantLock();
            otherPlayerConnected = gameLock.newCondition();
            otherPlayerTurn = gameLock.newCondition();
            players = new Player[2];
            currentPlayer = Player1;
            try
                server = new ServerSocket(12345, 2);
            catch (IOException ie)
                stop();
            message = "Server awaiting connections";
        public void execute()
           JOptionPane.showMessageDialog(null, "I'm about to execute!", "Testing", JOptionPane.PLAIN_MESSAGE);
            for(int i = 0; i < players.length; i++)
                try
                    players[i] = new Player(server.accept(), i);
                    runGame.execute(players);
    catch (IOException ie)
    stop();
    gameLock.lock();
    try
    players[Player1].setSuspended(false);
    otherPlayerConnected.signal();
    finally
    gameLock.unlock();
    Client.java
        public void init()
            startClient();
        public void startClient()
            try
                connection = new Socket(InetAddress.getByName(TienLenHost), 12345);
                input = new Scanner(connection.getInputStream());
                output = new Formatter(connection.getOutputStream());
            catch (IOException ie)
                stop();
            ExecutorService worker = Executors.newFixedThreadPool(1);
            worker.execute(this);
        }So after worker.execute(this), it should go to Server.java and run the function execute() right? But in my case, it doesn't. If you know how to fix this, please let me know. Thanks!

  • After downloadeding the latest Java plugin, I start to receive "Please configure your browser to allow Java applets to access the filesystem" message when I try to run a download wizard. What do I need to do? BTW, IE does not have this problem.

    I had no problem using a download wizard Java applet to download file to my computer from an SFTP site using Firefox. When I tried to do the same thing with Chrome, I was told to download the latest plugin. Once I did that, I receive the following message when I run the downlaod wizard:
    The Java Wizard cannot run.
    Please configure your browser to allow Java applets to access the filesystem.
    I got the same message using Firefox and Chrome. However, I have no problem using IE to run the same download wizzard. Please help.

    If the problem is with a site that is hosted using MOVEit DMZ by Ipswitch, please notify the site owner of the issue and ask them to apply the patch that is available on the support site to resolve the issue.
    This is a better resolution than downgrading your version of Java that was updated due to security issues.

  • Tools and sdk to make java applet for JCOP31 ?

    Dear friend,
    we have a contactless chip card with NXP contactless chip 36 Kb and 72 Kb...
    it has JCOP31 (java card open platform) inside the contactless chip..
    and we have to build the java applet to be inserted into the JCOP31 chip ...
    my questions :
    ========
    1. can we use eclipse to make java applet for this purpose ?
    2. what other tools and SDK do we need to make this Java applet and insert it into the
    JCOP31 chip ?
    3. How can we get the tools ? do you provide it ?
    4. do you know any company that can make this type of java applet for JCOP 31 ?
    5. do you know any company that provide training to make this java applet for jcop31 ?
    Thank you,
    Hendy
    IT Manager
    PT. Jaya Smart Technology
    Jalan Kapuk Kamal No. 45
    Jakarta
    Mobile : 62 815 840 528 63

    4. Anyone can write you an applet. The specification is open. You could e.g. contact IBM or NXP directly.
    5. NXP offers twice a year a training in Europe and once a yeat in Asia. Contact the customer support at NXP. Also there is a workshop about the 'Art of Java Card Programming' at the smart-university.net (17th Sept., Sophia Antipolis, France). But I think this is for advanced Java Card programmers.

  • Error in Visual Editor for java with eclipse

    hello eb
    till i ysterday i used visual editor for java with eclipse normally without any problem but to day when i opened eclipse it display me this error :
    Error trying to set new File into editor
    Motif : java.lang.NullPointerException
    and i think that the problem comes from the visual editor plugin because when i add a new frame or even for the old frame it dosent display for me the graphical component like every time
    if si has the solution or can advise me thank you alot and i really dont know what to do .
    it is for my stydy project and i have to finish xorking as fast as possible so if so can help me

    well this forum here is the official java-forum by Sun.
    you are asking for help on Eclipse, a software made by IBM since the cooperation between the two werent that bright all the time.(hence the name eclipse)
    i just looked a few hours myself, and the latest version of the VE was suited for 3.0.2, the version fitting to the latest 3.1 build of eclipse, was still just a release candidate.
    wait a few days/weeks for a final build and retry.

  • Detailed on how to install java applet ??

    Hi there,
    Can you tell me the detail on how to configure the pdk to use my
    existing applet ? I have followed the instructions in the pdf ..
    but it failed. And the instruction is not very clear.
    What is the proper procedure to do so ?
    Thanx
    -Maggie

    The way you would use a browser-run java applet is to take the
    HTML <APPLET> or <EMBED> tags you would normally use for your
    Java applet and use that HTML in your portlet.
    If you are talking about using an existing Java class, JSP, or
    servlet (all server-side), you can find detailed instructions in
    the getting started section of the PDK
    http://portalstudio.oracle.com

Maybe you are looking for

  • Threading with connection pool

    Hi My application is an interface to ldap directory. I have not used any ldap open source api to retrieve data from ldap. I have written connection pool that will help the application to connect to the ldap. It's working fine, but it's creating threa

  • My first from-scratch pkgbuild - [solved]

    Hi Archers! Yesterday, I set off on writing my own PKGBUILD from scratch for a package I have adopted - monkey. (http daemon)  I had used it previously on Damn Small Linux, and it was one of the programs that spurred my initial interest in Linux.  En

  • Critical Patch Update (CPU) for ASM Instance

    I'm getting ready to apply the Jul2007 CPU to my Oracle 10.2.0.2.0 RAC database. The correct patch number is 6079588. However, I don't see any info that tells me if I can / should apply the CPU to the underlying ASM instance too. I would think I coul

  • How do I create lists for my Gmail account?

    How do I create new Lists in my GMail account?

  • Screwed up my CD/DVD drive ...

    So lately my CD/DVD drive has been doing this thing where the logo doesn't show that there is a disc in there even when there is. It's also been a little sticky and hard to insert discs in there. So last night I went to insert a DVD, and kind of had