Using a filechooser in an applet

Is it possible to use a filechooser for an applet save button? If so how can you do it? So far I have only been able to use the filechooser object with JFrame and not JApplet.

Hi,
I'm a newbie, but I just had a similar problem and the solution was in the html code to display the applet. here's the code:
<applet width=700 height=500 code="ImageExample.class"> </applet>
make sure the height and width here are big enough for your imaage.
HTH
Paul

Similar Messages

  • Using a main in an Applet

    Hello, I have a question.
    How do you use a mian in an Applet.
    Eample, after an applet section is complete, I want it to go into Console use. Does anyone know how to combine the two? Thanks
    Note: So far, I got the program to go into the Console but It stops working when it asks for user input. There are no "String args[]" and that is what I hypothesis is the error

    import javax.swing.*;
    public class MyApplet extends JApplet {
         public void init() {
              //init stuff here
         public void start() {
              //start stuff here
         public static void main(String[] args) {
              JFrame f = new JFrame();
              JApplet a = new MyApplet();
              f.getContentPane().add(a);
              f.setSize(600, 400);
              f.setVisible(true);
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              a.init();
              a.start();
    }Excuse me, but is there a way to do this on Applet only instead of JApplet... I was told we need to use Applet only...

  • 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

  • Problem with using isAuthenticate method in my applet

    Hi everyone
    I want to be sure that everytime that I select my applet the secure channel has been opened. I found isAuthenticate method from SecurityService Interface and I think that I can use this method in my applet's select method for this purpose. But when I declare an object as this type like this:
    SecurityService Objsecurity;
    to use its isAuthenticate method , I'm able to build my code and make the cap file successfully but I recieve error 6F F6 while loading my applet, And I can't find the meaning of this error in GP.
    I'll appreciate it if anyone could tell me how can I use this method in my applet .
    And the other question is is there any other way to find out the authentication have been done or not?
    Best Regards
    Shili

    Hi Pedja,
    Thanks for the prompt reply.
    I have been following the link you mentioned to create ADF security and successfully implementedthe first part where if i directly give any internal page url it redirects me back to login page.
    Instead of using weblogic-sql authenticator, i wanted to manually authenticate the user in loginbean.java where i check the username passowrd against the db.
    I had also implemented the method to access username,password mentioned in the following thread
    Re: ADF security on my jspx  page as login page
    Insted of using authentication.login, i am calling the db method to do the validation.
    The thing is after my db validation it does redirect me to the success page(menu.jspx). but when i click links on menu.jspx it redirects me back to login page.
    so i understand that user is not yet set in the session.
    I am stuck at the point how do i code the login.jspx, currently my login.jspx does not have any j_security_check and i think this is what is creating the problem.
    while searching for adding jsecurity in jspx i landed on the blog of 2006 and started using that.
    Can you please point me to some link which explains how to code login.jspx , i have been trying hard for couple of days.
    Thanks again
    ash

  • How to use IE proxy with an applet and a socket ???

    Hello!
    I need to make an applet running with Internet Explorer.
    This applet uses socket and sends http request to a server (the server where the
    applet is).
    It's ok but it doesn't work when my IE uses a proxy.
    My question is: how my applet can makes a socket using the IE proxy ?
    My applet can be used by many users, so it has to work with or without proxy, and has
    no need no configuration.
    Thanks for your help.

    Check for the system environment variable for "ie.proxy" in your applet code, if it returns something then use the proxy server, if not then ignore it.
    However, as a rule of thumb unless your IE Security settings enable applets to access URLs, then it won't work. Next, speaking in general java - applets can only access resources (URLs) from the applet's originating server (i.e. the server where the applet exists).
    If IE uses a proxy, then your applet should automatically use it, unless as I metioned before, your IE Security does not allow permission for the applet to do so. Check Tools - Internet Options - Security - Java - Advanced options.

  • 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

  • I can't use swing components in my applets

    When I write an applet without any swing components, my browser never has any trouble finding the classes it needs, whether they're classes I've written or classes that came with Java. However, when I try to use swing components it cannot find them, because it is looking in the wrong place:
    On my computer I have a directory called C:\Java, into which I installed my Java Development Kit (so Sun's classes are stored in the default location within that directory, wherever that is), and I store my classes in C:\Java\Files\[path depends on package]. My browser gives an error message along the lines of "Cannot find class JFrame at C:\Java\Files\javax\swing\JFrame.class"; it shouldn't be looking for this non-existent directory, it should find the swing components where it finds, for example, the Applet class and the Graphics class.
    Is there any way I can set the classpath on my browser? Are the swing components stored separately from other classes (I'm using the J2SE v1.3)?
    Thanks in advance.

    Without having complete information, it appears that you are running your applets using the browser's VM. Further, I assume you are using either IE or Netscape Navigator pre-v6. In that case, your browser only supports Java 1.1, and Swing was implemented in Java 1.2. You need to use the Java plug-in in order to use the Swing classes (see the Plug-in forum for more information), or else download the Swing classes from Sun and include them in your CLASSPATH.
    HTH,
    Carl Rapson

  • Is there any way to use JDK1.4PreferenceAPI in JWS + Applet clients

    Dear Friends,
    Actually, we are in process of reusing the J2sdk1.4 new utilities like (Preferences API ) in all the applications means Application client, Java WebStart
    Client , Applet client. As for as Application client is concern , we do not have any problem at all, Its because of, J2sdk1.4 Preferences API provides an
    option to Plugin our Implementation for reading and writing User Preference Information.
    But Incase of JWS client or Applet client , we can not Plug in our own Preference Factory Implementation , because of some security concern. We came
    to know that it is possible via setting system property -D option and signing the Jar which uses this Preference API class. But it will create more problem
    for our client while using our application . So we need to use JDK1.4 Preference with out using above two methodology.
    Is there any possible solution which can help me to use the JDK1.4 Preference API in all the clients????.
    Please do help me as early as possible. This is very very important for us.
    Thanks in advance
    with regards,
    Pitchaimani

    Dear Sir,
    Thanks for your immediate reply, I had solved the problem by putting both the classes in a single signed jar. Now i am get into the new Problem. The problem is, even if i set the SystemProperty for Preference Factory, it doesn't take effect at all.
    Actually what happened was, while starting the
    Browser(Netscape or IE), browser will try to load all the Java classes (which includes InputMethodManager class also). This InputMethodManager class create an Object for Preference Node and use the same for getting the Preference values. In this case if i invoke My Application(Applet) from the browser, and set the System Property (For Preference Factory), it won't take effect at all. Suppose if i use Preference.userRoot() in my application, it will try to look the Java Preference Object and return the same which is not a desired one. So i would like to know, is there any mechanism to set/reset the Preference Factory (for my Application alone)???
    Please help me to get out of this problem. It is very very important for me.
    Your help is highly appreciated
    Thanks & Regards,
    Pitchaimani

  • Using a BufferedImage in an Applet? (Possible??)

    Hey,
    I've been attempting to use a BufferedImage as part of a Canvas class, it all works fine as an app, but then if i try and use the Canvas class in an Applet i get a ClassNotFound error saying the BufferedImage class cannot be found.
    Any ideas how I can fix this? Or is it simply not possible...there has to be another solution surely.

    Aye i just found that.
    One small problem though, it's all working now, except the graphics is treated a lot differently in the applet.
    Normally where i would draw on the canvas i would have 2x2 pixels, I now appear to have 6x6 pixels, and the point where the mouse is and where the pixels actually appear are well out of proportion. The cursor appears to draw about 150 pixels down and to the right of where the mouse actually is.
    I've put the applet up at
    http://www.doctor-monkey.co.uk/delarre/life/LifeApplet.html
    so somebody might be able to take a look and give some suggestions.
    Cheers for the help.

  • Using different LAFs in different applets in the same browser

    Hi All!
    I created my own LAF, which I want to use in my own applets. However, if I set the LAF through
    UIManager.setLookAndFeel(myLAF);
    it affects all applets in my browser. That is, if I have other applets on the same web page, or open other applets in other browser windows WITHOUT closing my applet window, they all use myLAF.
    To me it looks like all applets run in the same VM and therefore share the same static variable storing the current LAF. This is different in applications, because they all run in a separate VM.
    Is there a way to make each applet use a different LAF, while still running in the same browser or even on the same Web page?
    Thanks in advance,
    Viktor

    Can anyone say something on this topic? I'm really frustrated!
    I've been struggling to solve this problem with no luck. All I found is that it only happens on MS VM. It's Ok with the Sun VM.
    Does anyone know how to solve it on MS VM?

  • N7k: Use of $(TIMESTAMP) in eem applet

    Hi there,
    I'm trying to copy running-config to tftp-server whenever a "copy run start" was executed.
    event manager applet SAVE_TO_TFTP  event cli match "copy running-config startup-config"  action 1.0 cli copy running-config tftp://1.2.3.4/directory/switchname.cfg vrf management  action 2.0 event-default
    Works as expected, but I'd like to append the filename with a timestamp. However if i try this
    action 1.0 cli copy running-config tftp://1.2.3.4/directory/switchname.$(TIMESTAMP).cfg vrf management
    the variable $(TIMESTAMP) will be parsed immediately to this:
    action 1.0 cli copy running-config tftp://1.2.3.4/directory/switchname.2013-04-20-18.52.00.cfg vrf management
    Is there a way to get the actual eem execution timestamp? When using the same syntax in a scheduler config this works great...
    Regards
    Pille

    I know IOS has such a parameter, but I don't see the same parameter in NX-OS.  The only parameter I know will work is $command (the command that was run).  I did some tests, but I don't see a way to do what you want unless you use EEM to execute a tclsh script.  That will give you the ability to build whatever timestamp you want, but it isn't officially supported.

  • How to use special font in an applet so that text can viewed in any browser

    I have created an applet in which I use text with special font I have installed in my PC. The applet is correctely executed with associated html file in my PC. I try to execute the files in another PC in witch the font is not installed. Text with the special font is not correctely viewed.
    can you help me how to do?
    thanks

    Both java.awt.Component and java.awt.Graphics have a method setFont(). You can set whatever font you want. However, if the user does not have that particular Font installed, whether the font is auto-installed for the user is browser and browser-setting dependent.
    - Saish

  • 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 Loadrunner to test Jinitiator applets

    I am not familiar with JInitiator, and I am currently researching using LoadRunner 7.5 to perform load testing on an applet using JInitiator 1.1.8.19. The applet also uses Java RMI as its messaging protocol.
    Is there any information about how to do load testing on JInitiator, or has anyone used Loadrunner for Jinitiator jvm-based testing before?
    If so, any assistance would be greatly appreciated. Of course, the deadline for my research was yesterday! :/
    Thanks,
    Brent Friedman

    You want to use LoadRunner 7.5 to load test Forms? This is possible, just make sure you use Oracle NCA. The rest should be straighforward.
    You don't test JInitiator, as such. LoadRunner will simulate the clients. So you don't need to do "Jinitiator jvm-based testing". Remember, you're testing Forms on the middle tier, no JInitiator on the client.
    Regards,
    Robin Zimmermann
    Forms Product Management

Maybe you are looking for

  • How to populate the last empty row in Excel without using Report Generation Kit

    I wrote  a Labview SUb Vi that uses Report Generation Toolkit that is not loaded on the test stand. I am looking to convert it from Report Generation Vi like New Report,  Append Table to Report, Dispose Report. The tunneling through all the report ge

  • Why can't Verizon fix its own errors

    Very simple problem. I have an IMAC and am paying for McAfee internet security. It is beyond Verizons ability to install this product to my computer because they have an erroneous "order pending" for several months. They can't seem to cancel the fals

  • Cant find driver for graphics AMD Radeon 6600M and 6700M series / Intel(R) Graphics 3000

    my graphic drivers doesnt work so my screen in stretched and wide then the usual. My hp assitant recommades the following two graphics drivers  AMD Radeon 6600M and 6700M series version: 14.501.1003.0 Intel(R) Graphics 3000 version: 9.17.10.2932 cant

  • Can i create and use my own apple ID and still have the music from my sisters account?

    I share an itunes account with my sisters and they wont let me use my imessage or facetime because it shows up and says what ive been doing and they dont want that. So can i make my own account so i can use imessage and facetime but still get my musi

  • How was this created

    I have a hard time believing that someone manually adjusted all 1200 gradient mesh nodes to cook this up just to sell it on a stock site...  Is there another way to generate meshes?  I need to do another version of this style...