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.

Similar Messages

  • How to update content of a file on server using a Java Applet?

    Hi,
    I'm new to Java, and I have a task now to overwrite a text file on a server using an applet. I have written a piece of code which compiles but doesn't work. Can you please take a look at the code or give me another way to do it?
    Thanks.
    Code:
    import java.applet.Applet;
    import java.io.*;
    import java.net.*;
    public class test2 extends Applet{
    public void init() {
    StringBuffer buf = new StringBuffer();
    try {
         String output = "this is some string";
         URL aUrl = new URL (getCodeBase().toString() + "test.txt");
         System.out.println(aUrl);
         URLConnection con = aUrl.openConnection();
         con.setDoOutput(true);
         PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(con.getOutputStream())));
         out.println(output);
         out.close();
    catch (MalformedURLException mue) {
         System.out.println("improper url");
         mue.printStackTrace();
    catch (IOException e) {
         System.out.println("io exception");
         e.printStackTrace();
    }

    Ram.ViSolve wrote:
    869975 wrote:
    Thanks. I knew there would be a security issue, but I do not have sufficient knowledge to get around it. If you have a reference how to configure a server please post it here.You need to create Signed Applet. Because normally applets have some restriction to access the files in the client machine. Signed applets overrides the restriction.
    To know more, Read [url http://192.9.162.55/developer/onlineTraining/Programming/JDCBook/signed.html]Signed Applet
    No. Our OP wants to write to the server, not to the client! And to achieve this from an applet, you don't need it signed, iff the server is the machine from where the applet was downloaded in the first place. You only need to use a mechanism that allows you to write to servers, which HTTP is not. FTP, on the other hand, if setup properly can do it. So instead of trying to write using an HttpURLConnection (OP's attempt), you would use an FTP client library. FTP here is just an example and probably not the best way. Another option is to use some servlet or PHP or ASP on the server side and the applet will sumbmit the changes to that code on the server, which in turn will write to the file. The idea is that you need some 'partner code' on the server, be it the FTP server or the servlet/PHP/ASP code. None of this requires the applet to be signed.

  • Fonts are not reflecting while running Java Applet Through Forms

    Hello Oralce Gurus!!
    I have a Java Applet which has few lines of text in different
    fonts such as AgencyFB, Verdana Ref etc., When I am running this
    applet from console, I am able to see the text in different
    fonts. Where as If I run the applet through forms (as a Bean
    (ViewerBean) ), the fonts are not reflected. The text appears in
    a default font.
    All the fonts are installed on WinNT, where the applet resides.
    I will be greatful if anyone can suggest me a solution.
    Thanks,
    Raghu

    try out this
    ImageIcon img1=new ImageIcon(this.getClass().getResource(imagename));
    for exmaple
    Imageicon img1=new ImageIcon(this.getClass().getResource("name1.jpg"));
    dont 4get to include the image files in the jar file

  • Call other html page on using a java applet!!

    Can I call other html page using a function into a java Applet? Please, somebody reply!!!

    How can i do? Explain!! Thanks...

  • Industry use for java applets?

    I have been writing an applet for my fantasy football league that uses a mysql database. I am doing this to learn java. My counselor from NC State referred me to some guy looking for a web programmer. He called me up and I was able to get him to come over to the house just a minute ago. His company wanted a website to be used only by his employees as they called customers and asked if they had any metal cutting equipment they wanted to sell or buy.
    He wasnt very computer savy but insisted the site be done with ASP or.NET.
    My question is this....
    Why would a java applet not suffice for this problem? I even offered to do it free for something to put on my resume(maybe this was my mistake). I am planning on learning JSP/J2EE very soon as I am almost finished my my applet.
    I am just wondering what would be the problem with doing this as an applet.
    I told him I could do it in a week as I know I could. Why do companies insist on using technologies they dont really need? Or am I not seeing something here? Any feedback appreciated...
    [email protected]

    Companies insist on using technologies that they don't really need for three reasons:
    1) (a good reason) They've already paid for some equipment or licenses and want to exploit those purchases. Introducing a new technology would require new expenditures. (This isn't applicable if the new technologies are free, of course.)
    2) (a good reason) Their current staff already know a particular technology, and so they insist on doing new work in that technology to reduce maintenance issues. If everyone at the company knows .Net and you do something in J2EE, then in the future any maintenance would require either training, or hiring an outside consultant to do the maintenance. This costs money.
    3) (the bad, but sadly most common reason) They're stupid. They read a sales pitch from Microsoft that says "J2EE bad, .Net good" and they believe it. Or they just love everything from Microsoft, because, gosh, doesn't everyone? Or they learn a tiny bit of information (".Net can be used to do things kind of like this") and refuse to consider anything else because that would reveal the tinyness of their knowledge.
    Though it's not clear to me from your description whether applets are the best solution either. Why does he need a web site at all for this? What will the application do? Why not use C++ or Flash/Actionscript, for that matter?

  • Java Applet of Forms

    How can i set properties of Java Applet(Forms) like X,Y,Center,Top,Bottom etc.

    Some properties are exposed though the various Forms parameters in the formsweb.cfg file - width and height for instance.
    For anything else you'd have to write a Pluggable Java Component(PJC) which can get hold of the Applet object and manipulate it.

  • Is there a size limit for the *.au files to be used in Java applet

    Hi,
    I wrote an applet to play,loop and stop au files but I couldn't get the sound out of it,it was working fine with a 64 kbyte au file but once I use a 900 kbyte file,it does not work.I was wondering whether is there a limit for the size of the audio file?Thanks
    les

    4kByte file size, 1000 notes max.

  • We use a Watchguard Firewall to Login to the Internet. It uses a Java Applet. Why isn't it loading properly after upgrading to 8.0

    This is what appears instead of the login Screen:
    <html><head><title>Watchguard Authentication Applet</title></head>
    <body BGCOLOR="#FFFFFF"><applet name="WatchGuard Authentication" code=Main width=600 height=250>
    <param name=HOST value=192.168.0.1>
    <param name=PORT value=4100>
    <param name=imagename value=logo.gif>
    </applet></body></html>

    Do you have another device to check if the router or your ipad.  It's good to check on another device if available.  If you don't go to Settings > Network > Reset all network settings.  I'm going from memory but think it's here.  This will prompt you to log in again like the first time.  Good luck. 

  • How to install and use Imageupdater java applet?

    I have downloaded the Imageupdater Zip file, extracted all the files and tried running the example program, but it loads a blank screen with a grey box, and at the bottom of the screen has a security error message saying cannot access "127.0.1"3000 ??? I have tried openening the example test vi and running it as a web server, but still no change. Does anyone have any information on this program and how to get it to run with the example program as well as with my application.
    Any help or documentation on this ImageUpdater would be greatly appreciated
    thanks
    DRW

    First, enable the LabVIEW Web Server by going to Tools >> Options >> Web Server:Configuration. Next, place the jar and html files in the /www directory. Then, run the main VI in ImageUpdater.llb and the testvi.vi. Lastly, open your browser and type http:\localhost\ActionImageUpdater.html
    Hope this helps.
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect

  • Embedding Java Applet in Oracle Form

    I'd like to embed Java applet in Oracle Form. Please someone help me..let me know how to do it. Also I need to know how'll I use a jar within Oracle. Please help.
    Regards
    Rashed

    Hi Grant
    Thanks...I developed an applet which has a button on it and clicking the button something will happen. I mean this is a complete java project. Now I need to use this java applet from Oracle Form...that means I'll develop an oracle form on which the applet will be embedded so that the button on the applet can be pressed. Now could you please help me do this? I also have another problem but I need to resolve this first.
    Rashed

  • Taking screenshot with java applet using java robot class not working

    Hi Everyone,
    I am using the java applet to take screenshot of the web browser using the java's robot class.
    Robot objRobot = new Robot ();
    BufferedImage objBufferedImage = objRobot.createScreenCapture(objRectArea);
    The thing work good in windows system taking screenshot but in case of mac osx i get the blank image.When i check the event viewer in mac osx i get the following error.
    invalid context
    invalid pixel format
    CoreAnimation: rendering error 506
    The problem is coming for all the browser safari,firefox and chrome.My applet is signed applet.
    What might be the reason.An early reply is very valuable.
    My machine configuration is as follows.
    OS : MAC OSX
    Version : 10.6.4
    Is that a system level issue , java plugin issue?I'am confused with this error.
    Thanks sagar.

    870613 wrote:
    invalid context
    invalid pixel formatHm, seems like the Mac implementation of the Robot class is doing some bad initializations there. I can't be a 100% sure of course, but this smells like a bug to me. Are you sure you have the latest version of Java installed?

  • Which java applets are used for..........................

    hi,
    i want to ask that which java applets are used for receving sms on website.?????????????????????????
    or how can we receive sms on website by using which java applets? or tell me any other method for doing this task.
    thanx in advanced

    Hi,
    For general ledger :
    http://help.sap.com/saphelp_nw70/helpdata/en/57/dd153c4eb5d82ce10000000a114084/frameset.htm
    This is the best how-to guide on AP,AR,GL and TAX.
    http://help.sap.com/saphelp_nw04/helpdata/en/af/16533bbb15b762e10000000a114084/frameset.htm
    Hope it helps.
    Regards,
    Srikanth.

  • 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)

  • Help for using java class in forms 9i

    hi
    i have been trying to use java class in forms9i but unable to execute ,i have encountered exceptions,for which exception handlers have been declared like ora_java.java_error and exception_thrown but failed to handle run time errors , i have tried all ways from my side.
    my java class returns a simple string
    i need help on various work arounds
    thanks in advance
    yash

    sir
    i have written a simple java class which returns a string hello imported using a java importer in forms 9i
    and i call my class in when button press trigger
    i have also imported java.lang.Exception for my exception handlers,i have no compile errors,but when i run my forms i get run time error and my exception handlers fail to trap it . ihave no idea how to proceed .
    should i use bean area in form and call the class using fbean from custom item rigger if so please explain
    can i get sample code example for calling a java class methods from forms.
    thanks
    yash

  • Java Applet in a HTML page: failing with PLS-00306: wrong number of args

    We are trying to use a Java Applet in a HTML page. as our system needs to be able to retrieve a predefined set of data from a third party system that uses Dynamic Data Exchange Protocol (DDE) and are encountering errors from APEX and in IE itself.
    We are using JavaDde from www.nevaobject.com that enables our Java applet to interact with Windows applications (Third Party System) using DDE.
    This functionality is currently used in our Web Form 6i application and we are trying to use the same in the new ApEx application.
    We are using ApEx version : 2.1 and actually aer encountering 2 problems:
    Problem 1: ApEx failing with PLS-00306: wrong number or types of arguments in call to 'ACCEPT'
    Problem 2: IE crashes if Applet used in a complex page with several regions (1 Context, 4 Report Regions, 2 level Tabs, Links)
    This problem does not occur in the page where there is only applet and one region. In the case of complex page the IE crashes if the page is reloaded
    Test scenario:
    1- Create a simple page with the HTML region.
    2- Define the Source of the above region as follows
    <OBJECT CLASSID="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    CODEBASE="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#version=1,4,0,0"
    WIDTH="1"
    HEIGHT="1"
    ID="simpleApplet"
    NAME="simpleApplet">
    <PARAM NAME="code" VALUE="simpleApplet.class" >
    <PARAM NAME="archive" VALUE="simpleApplet.jar" />
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">
    </OBJECT>
    3- Create a simple Java applet "simpleApplet" - for the test its enough if the applet will have just the init method printing out the mesage to the console
    4- Create a Submit Button (not redirect) in Region Header and create unconditional (do not set When Button Pressed property) Page Branch to navigate to another page (the page without the applet)
    6- Run the page and Submit -
    The error below is returned by the engine:
    In our case our applet is called ddeApplet - I do not know why is ApEx passing the Applet's ID down to the wwv_flow.accept method as a parameter
    Tue, 24 Jul 2007 08:15:39 GMT
    ORA-06550: line 7, column 2:
    PLS-00306: wrong number or types of arguments in call to 'ACCEPT'
    ORA-06550: line 7, column 2:
    PL/SQL: Statement ignored
    DAD name: rbdev2_ax
    PROCEDURE : wwv_flow.accept
    URL : http://castor:7778/pls/rbdev2_ax/wwv_flow.accept
    PARAMETERS :
    ============
    P_FLOW_ID:
    147
    P_FLOW_STEP_ID:
    500
    P_INSTANCE:
    6986070096861669560
    P_PAGE_SUBMISSION_ID:
    1005758
    P_REQUEST:
    CRASH
    P_ARG_NAMES:
    100380029717786501
    P_T01:
    147
    P_T02:
    101
    P_T03:
    5000044
    P_T04:
    1
    P_T05:
    S
    DDEAPPLET:
    Ddeapplet[panel0,0,0,1x1,layout=java.awt.BorderLayout,rootPane=javax.swing.JRootPane[,0,0,1x1,layout=javax.swing.JRootPane$RootLayout,alignmentX=null,alignmentY=null,border=,flags=385,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
    P_MD5_CHECKSUM:
    ENVIRONMENT:
    ============
    PLSQL_GATEWAY=WebDb
    GATEWAY_IVERSION=2
    SERVER_SOFTWARE=Oracle HTTP Server Powered by Apache/1.3.19 (Unix) mod_fastcgi/2.2.10 mod_perl/1.25 mod_oprocmgr/1.0
    GATEWAY_INTERFACE=CGI/1.1
    SERVER_PORT=7778
    SERVER_NAME=castor
    REQUEST_METHOD=POST
    QUERY_STRING=
    PATH_INFO=/pls/rbdev2_ax/wwv_flow.accept
    SCRIPT_NAME=/pls
    REMOTE_HOST=
    REMOTE_ADDR=192.168.66.169
    SERVER_PROTOCOL=HTTP/1.1
    REQUEST_PROTOCOL=HTTP
    REMOTE_USER=
    HTTP_CONTENT_LENGTH=661
    HTTP_CONTENT_TYPE=application/x-www-form-urlencoded
    HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
    HTTP_HOST=castor:7778
    HTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
    HTTP_ACCEPT_ENCODING=gzip, deflate
    HTTP_ACCEPT_LANGUAGE=en-us
    HTTP_ACCEPT_CHARSET=
    HTTP_COOKIE=ISCOOKIE=true; LOGIN_USERNAME_COOKIE=rdanko; ORACLE_PLATFORM_REMEMBER_UN=RDANKO:ngrb; WWV_FLOW_USER2=70FBB00945FE46B9; V6_AUTHENTICATION_COOKIE=70FBB00945FE46B9
    Authorization=
    HTTP_IF_MODIFIED_SINCE=
    HTTP_REFERER=http://castor:7778/pls/rbdev2_ax/f?p=147:500:6986070096861669560:::::
    HTTP_SOAPACTION=

    "theArrow",
    It looks like whatever HTML you're including on your page is creating HTML input form elements inside the HTML form "wwv_flow". This form is posted to wwv_flow.accept, and of course, the PL/SQL procedure wwv_flow.accept doesn't know anything these additional arguments/form elements you're attempting to POST.
    Joel

Maybe you are looking for

  • How can i delay the present of direct connected route?

    Hi, I got 2 3550SMI switch interconnecting by Etherchannel. Each 3550 has an uplink to its upstream router (R1-SW1=SW2-R2). R1 and R2 connects to the remote site routers (say R3 and R4). With EIGRP redistribute connected, R1 update the direct connect

  • Viewing mail in HTML format

    Sir, I am unable to open my personal Email in HTML format can anybody help me resolving this problem I will be highly oblized. Krishna. Email-

  • Aperture 3 and Artifacting

    I currently use Aperture 3 Version 3.1.2.  I use a Canon EOS 5D Mark 2 and only shoot in RAW. I find that if I for any reason use 'Presets' in Adjustments, Aperture introduces artifacting into my photographs.  Retouch Brushes also seem to do the same

  • Update record problem

    drmwv 8; ASP.NET; access 2003 I want to make a record-update page with the wizard. With just 1 record showing on the page, update is working. If I add a repeated region and a navigation bar, I get this errors: System.Data.OleDb.OleDbException: Field

  • Macbook Air won't start after Yosemite update

    Hi all, I have a late 2013 model macbook air (just out of the 1 year warranty). I updated to Yosemite last night and to complete the install I restarted the macbook when prompted, but it never turned back ok. I can now hear the macbook trying to star