Size of applet & scrollbars

I start the applet from a html page with <applet....width="100%" Height="100%">. The problem is the components on the applet are created dynamically and can be changed to need a different size applet by changing a config file. The applet use table layout manager. The problem with using width="100%" & Height="100% is that if the browser size starts small any horizontal scroll does not scroll to the full width of the applet - the browser needs to be resized manually to see all the components.
The html file that start the applet is built on the fly, so I could potentially read the config and set the width manually. But there are lots of components in the applet and it would mean maintaining size in 2 different places.
Any comments appreciated.
Thanks, Tom.

I start the applet from a html page with <applet....width="100%" Height="100%">. The problem is the components on the applet are created dynamically and can be changed to need a different size applet by changing a config file. The applet use table layout manager. The problem with using width="100%" & Height="100% is that if the browser size starts small any horizontal scroll does not scroll to the full width of the applet - the browser needs to be resized manually to see all the components.
The html file that start the applet is built on the fly, so I could potentially read the config and set the width manually. But there are lots of components in the applet and it would mean maintaining size in 2 different places.
Any comments appreciated.
Thanks, Tom.

Similar Messages

  • How to set the size of applet when invoking forms through formsserver

    HI,
    I m using forms server to display my forms in browser, my
    problem is to change the size of applet at runtime so that the
    entire forms is displayed.
    right now the forms whose size is more r displayed with
    scrollbars.
    and thats giving me problem with printing.
    Sreekant

    - The HEIGHT and WIDTH parameters in the HTML file are
    responsible for the size
    of the applet area. This is documented in the Forms online
    manuals. The
    manual also states that these values are in pixels.
    Tip
    This value can be set to a percentage of the browser's available
    work space.
    This means that if the browser is resized or the DISPLAY
    resolution is changed
    the applet area will adjust to those changes.
    Example
    Instead of the following:
    WIDTH=800
    HEIGHT=600
    Change to:
    WIDTH=100%
    HEIGHT=100%
    This will make the applet use 100% of the browser's work space.
    If you
    change the values to 50%, the applet will use 50% or the
    browser's space.
    The HEIGHT and WIDTH values can be defined in your FORMSWEB.CFG
    or your own
    static html file. These values can also be added to the URL when
    using CGI.
    NOTE: THIS WILL NOT WORK IF SEPARATEFRAME=TRUE
    Regards
    Grant Ronald
    Forms Product Management

  • How to change the size of the scrollbar in JScrollPane?

    I set a jtable in the jscrollpane,but the table is very small,so I want to change the size of the scrollbar in the jscrollpane.How can i do?Please help me,Thanks.

    Dropping and re-creating the table is by far the best way (of course you need to unload the table's data to a flat file with ttBulkCp first and then reload it again afterwards).
    a second option is to drop the column and re-add it with the new size but you still need to preserve the data first and put it back afterwards and this is harder for a single column than for a whole table. Also, if you are using replication you should exercise care when using ALTER TABLE to ensure iall replicated copies of the table maintain the same physical structure.
    Chris

  • Size of applet in Internet Explorer

    Thanx in advance
    When i run a form through 9iDS it shows the form not in actual size in applet window. How can i make changing in applet size.

    Hi,
    in the file <oracle_home>/forms90/server/formsweb.cfg
    Param width and height.

  • How can i increase size of applet

    when i run my form in windows my applet don't visible full .how can change the size of applet.what property i have to set.i forget that property.

    are you using an application server or the local OC4J container?
    In both cases the height and width of your applet can be set in the formsweb.cfg file.
    you can find this file under <oracle_home>/forms/server directory
    search in the file for with and height
    you can put a fixed size in pixels or in percentage of your screen resolution
    hope it helps
    Erwin

  • Size of applet

    Hi
    I want to know the total size of my applet.
    It contains the size when installing it and the memory used while processing it.
    How should I calculate?
    Do it become it as well as the size of "CAP file"?
    When the package is installed from the JCOP shell, the following messages are output.
    Load report:
      16030 bytes loaded in 64.9 seconds
      effective code size on card:
          + package AID       6
          + applet AIDs       17
          + classes           95
          + methods           13137
          + statics           125
          + exports           0
            overall           13380  bytes

    Hi
    I solved the problem.
    I installed the test applet (..return value of "getAvailableMemory".. make a response).
    And, I installed many applets that wanted to measure the size while changing AID.
    And, when applets of a certain number were installed, test applet ("getAvailableMemory") returned 6A10h.
    And, when the applet of another piece was installed in addition, test applet ("getAvailableMemory") returned 17DCh.
    6A10h - 17DCh = 5234hI think that the size of my applet is 5234h.

  • How to let Stage size adjust to size of applet ?

    Sirs and madams,
    I need to deploy an app online. There is going to be lots of stuff on the Stage.
    To keep possible damage to user's eye minimal i would like to adjust the size of the Stage and
    it's components to the size of the applet.
    Is such a thing possible? If yes - how?
    Thanks in advance!

    The size of the applet is defined in the HTML file generated by javafxpackager (or NetBeans using the latter):
    <script>
        javafx(
                  archive: "JavaFXProgram.jar",
                  draggable: true,
                  width: 1024,
                  height: 768,
                  code: "JavaFXProgram",
                  name: "JavaFXProgram"
    </script>In general, you define these values to the size of the stage, not the way around...
    Although, I suppose you can generate these sizes if you generate dynamically the page (eg. with a JSP or something similar).
    You can get these values with FX.getArgument(), and size the stage with them:
    def WIDTH: Integer = Integer.parseInt(FX.getArgument('width') as String);
    def HEIGHT: Integer = Integer.parseInt(FX.getArgument('height') as String);
    Stage
      title: "JavaFX Packaging and Deployment Test"
      width: WIDTH
      height: HEIGHT
      scene: scene
    }

  • Build Q - minimizing size of applet

    hello,
    I'm writing a charting applet with JFreeChart, which is awesome but large. I've tried both including jfreechart.jar in the run-time libraries, and pulling out the .class files & putting them in my source folder, in the hope that Creator would walk the dependency tree and just include what it needed - but no luck, it includes everything and i'm left with a close to 3Mb applet with performance issues.
    Short of either becoming an ant master, which i suppose i'll need to do eventually anyway, or manually just including the classes i think i need from the library & then looking for runtime errors, is there any way to get Creator to include just the classes it needs in the final applet.jar?
    TIA,
    alex.

    AFAIK, creator will include all specified classes and will not exclude unused classes. (After all, the code could be loading classes dynamically and so unless the user specifically instructs that a class should not be included in the archive, the ide will by default include all classes).
    So, imho, you will need to arrive at the list of needed classes by the method you have suggested.
    btw, have u tried <param name=archive value="myapplet.jar" , "jfreechart.jar">? I think this will cache the chart jar and hence will speed up download after the first time...
    Ref: http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/applet_caching.html
    If it is an internal application, then you could also request users to install freechart jar as an extension library in their java runtime...
    From http://www.jfree.org/jfreechart/faq.html#FAQ3:
    Can I use JFreeChart in an applet?
    ...There are some provisos though:
        * JFreeChart doesn't incorporate any special applet features. For example, you can't pass data to the chart applet via HTML as you can in some charting packages.
        * we haven't made any special effort to minimise the size of the JFreeChart jar files. It is something that could be done, but really the demand for it is low, so it hasn't been done yet.

  • Minimization size of applet

    So I need to create empty applet, with smallest size.
    import java.applet.Applet;
    public class EmptyApplet extends Applet
         public void init()
    }After compiling its size about 2KB is any chanses to increase its size?

    Probably not, but why would someone do something pointless like creating an empty applet?

  • Pack200 for reducing size of applets

    Hi i am working swing based applet application which is deployed on a jboss3.2.6 webserver.the jar file application.jar+ size is 140kb.i compressed the jar file using sun java pack200 technology as application.pack200.gz+ file.now the jar file size is 46kb.the jar is deployed on application.war+ file with context-path */application* on the jboss deploy path.the war file that contains the jar file also has a servlet(pack200 servlet provided in the sunjava website) to service the *.jar requests to give the compressed application.pack200.gz file to the response.outputstream() for any incoming requests for any jar file.
    When i make a request on the webbrowser as http://localhost:8080/application/application.jar+ the pack200 service servlet inside the application.war services the request to yield a compressed application.jar(46kb).+
    Now the problem arises when im calling application.jar+ from an html page(*index.html*)using THE FOLLOWING CODE
    <html>
    <html>
        <title>
    Applet APPLICATION
      </title>
      <head>
         <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
         <meta HTTP-EQUIV="Expires" CONTENT="-1">
      <meta HTTP-EQUIV="accept-encoding" CONTENT="gzip,deflate">
      <meta http-equiv="content-type" content="text/html">
      </head>
    <BODY>
    <Applet code='application.main.class' codebase='.' archive='../application/application.jar'>
    <param name="java_arguments" value="-Djnlp.packEnabled=true"/>
    </applet>
    </BODY>
    </HTML>The index.html file calling the applet is deployed in separate war file viewer.war+ with a context path */view* inside the jboss3.2.6 deploy path
    When i load the index.html inside the webbrowser i always get the following exception in the sun java console of the webbrowser
    Java Plug-in 1.5.0_02
    Using JRE version 1.5.0_02 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\kartheepan
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    load: class application.main.class not found.
    java.lang.ClassNotFoundException: chart.MainApplet.class
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadCode(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
    at sun.applet.AppletClassLoader.getBytes(Unknown Source)
    at sun.applet.AppletClassLoader.access$100(Unknown Source)
    at sun.applet.AppletClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 10 moreThe applet did not load successfully.
    When i change the coding in the pack200 service servlet to give application.jar+ as response rather the compressed application.pack200.gz+ the application loads successfully in the index.html without fail.I believe there is no problem with the pack200 service servlet provided by the sun website.I am using jdk.1.5 version of java for development with jboss3.2.6 as application server.
    i am afraid the webbrowser is not able to decompress the compressed application.jar successfully using the jdk1.5/bin/+unpack200.exe+ provided by the jdk1.5 version of java.Is it something im missing in the index.html+ code.
    i have provided the following 2 mandatory things as mentioned in the pack200 deployment guidelines
    <meta HTTP-EQUIV="accept-encoding" CONTENT="pack200-gzip,gzip">inside the <head> tag and also
    <param name="java_arguments" value="-Djnlp.packEnabled=true"/>i even tried changing the meta tag value from
    <meta HTTP-EQUIV="accept-encoding" CONTENT="pack200-gzip,gzip">to
    <meta HTTP-EQUIV="accept-encoding" CONTENT="gzip,deflate">but with no success i still get the class not found exception.
    Where i my going wrong shoul i need to write any pack200 install routine.AND IF SO WHERE DO I need to write should it be written on the server provided alongside the compressed jar or should it be present on the client machine.
    Edited by: kartheepanmirra on Jun 12, 2009 8:45 AM
    Edited by: kartheepanmirra on Jun 12, 2009 8:49 AM

    is it some thing to do with the application server jboss3.2.6 it works fine in my localsystem and adjacent systems in intranet but it fails in remote system where network access between the remote and my system is slow.I get the following exception in jboss 3.2.6
    18:34:19,875 ERROR [Engine] StandardWrapperValve[jarService]: Servlet.service() for servlet jarServi
    ce threw exception
    java.lang.NullPointerException
            at ContentType1.doGet(Unknown Source)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
    ava:237)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
    ava:186)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:19
    8)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.ja
    va:158)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11P
    rotocol.java:705)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
            at java.lang.Thread.run(Thread.java:619) when it fails to decompress on the remote machine.The decompression works fine in local and adjacent machine.also i checked it myself to c whether the servlet services the compressed jar file.yes it works fine.the servlet has no problem.I think it must be some issue with the slow network.but nevertheless it should work fine in local area network.if it doesnt it will not work in internet.
    Edited by: kartheepanmirra on Jun 16, 2009 8:48 AM
    Edited by: kartheepanmirra on Jun 16, 2009 8:51 AM

  • Combo box menu calculation of popup size ignores horizontal scrollbar

    I have a JComboBox that I've setMaximumRowCount(20). However, sometimes the combo box has as few as 2 or 3 items in it. In those cases as you probably know, Swing automatically calculates how tall the popup should be, in this case 2 rows tall.
    However, this calculation ignores the horizontal scrollbar, which basically occupies a "row" itself. This means that if I have combo box with 2 items, the displayed popup will contain the first item, a horizontal scrollbar, and a vertical scrollbar (for scrolling down to the item that the horizontal scrollbar hides) . Is this a bug in Java? If so, are there any workarounds to this?
    I've looked in the bug report section using the terms "combobox horizontal scrollbar popup" and couldn't find anything
    thanks

    the very simple strategy to do is to call removeAllItems() method for the 2nd combox box and then insert the contents. this is because the validate() method is not repeatedly called and so the contents are not updated immediately.

  • Set heap size for applet

    I know that it is not allowed programmatically but what is syntex of the command to set max jvm. Which class name muste given in the command. I tried :
    java -Xmx128m
    if I write just like that, a screen shows as I write -help.
    Thank you

    I suspect you can't
    anything like that is restricted as it allows you
    access to the system.
    this prevents against the possibility overflow.
    though having said that , I don't know much about native methods in JAVA.

  • Adding scrollbars to a applet?

    I am trying to write a small java applet for my personal interest, but I can't seem to figure out how to add scroll bars to my applet. What I have so far is this
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.*;
    import java.io.IOException;
    public class SimpleApplet extends JApplet {
      public SimpleApplet() {
        JPanel p = new JPanel();
        p.setLayout(new GridLayout(20, 3, 3, 3));
        p.add(new JLabel("Username"));
        p.add(new JTextField());
        p.add(new JLabel("Password"));
        p.add(new JPasswordField());
        p.add(new JLabel("Username"));
        p.add(new JTextField());
        p.add(new JLabel("Password"));
        p.add(new JPasswordField());
        p.add(new JLabel("Username"));
        p.add(new JTextField());
        p.add(new JLabel("Password"));
        p.add(new JPasswordField());
        p.add(new JLabel("Username"));
        p.add(new JTextField());
        p.add(new JLabel("Password"));
        p.add(new JPasswordField());
        Container content = getContentPane();
        JScrollPane scroller = new JScrollPane();
        scroller.setLayout(new BorderLayout());
        content.setLayout(new GridBagLayout()); // Used to center the panel
        content.add(scroller);
        //content.add(p);
    public static void main(String[] args) throws IOException, ClassNotFoundException {
         SimpleApplet J = new SimpleApplet();
    }when I try to run this the applet fails, but if I delete all the lines with scroller the applet runs fine expect that I can't see some the textfield on the applet unless I enlarge it. I want to add a scrollbar in so that I can scroll down to the unseen parts without enlarging the applet screen. Can any1 help me figure out what i'm doing wrong?

    Encephalopathic wrote:
    bigauto wrote:
    I'm still running the applet in eclipse and I haven't tested it on a webpage yet. It shouldn't matter whether it on eclipse or a webpage should it? The applet itself didn't become small, but all the components like the textfield became micoscope.Does it matter if the application is ran on eclipse or a webpage?1) did you look at my example? Did you get rid of your setting the contentpane's layout to gridbaglayout? the contentpane by default uses borderlayout and this should let the jscrollpane fill your applet. If you don't do this, you may need to set a preferred size for your jscrollpane.
    2) I think that you can size the applet in Eclipse's Run Dialog, but I'm not sure. You size it in "real life" in the HTML code (I think).Thanks a lot. That fixed it.

  • Can I set JVM memory size when running applets?

    Hi,
    I have downloaded an applet that renders panoramic images and
    I have a problem with Java memory. I remember that default maximum
    size that applet can use is 70MB, and the problem is 70MB is
    not enough when rendering big images. It is OK when I add
    "-Xmx -Xms" parameters in the Java Control but I cannot tell
    everyone who wants to see my images to go control panel, add
    parameters etc..
    So my question is...
    Is it possible add "-Xmx -Xms" parameters inside the applet file
    so that these parameters run automatically when executing applet?
    Thanks in advance for your reply!
    Hyung

    Hi,
    I have downloaded an applet that renders panoramic
    images and
    I have a problem with Java memory. I remember that
    default maximum
    size that applet can use is 70MB, and the problem is
    70MB is
    not enough when rendering big images. It is OK when I
    add
    "-Xmx -Xms" parameters in the Java Control but I
    cannot tell
    everyone who wants to see my images to go control
    panel, add
    parameters etc..
    So my question is...
    Is it possible add "-Xmx -Xms" parameters inside the
    applet file
    so that these parameters run automatically when
    executing applet?
    Thanks in advance for your reply!
    HyungA potential workaround I would try is is use ByteBuffers
    (T)

  • Scrollpane to applet size urgent!!!

    Hi,
    I have 2 issues in my project.
    1. I want JScrollPane container in my applet to take the size of applet.
    2. I want applet to take the size of browser.
    Applet might be run on different computers with different resolutions. So, I want the applet to adjust its size to the browser and the scrollpane to adjust its size to the size of applet.
    Please help me in resolving this problem. as my project is looking ugly without the above features.
    Thanks in advance.
    with regards,
    Dawood.

    851102 wrote:
    I have 2 days to complete the applet.That is not our concern.
    I have an attendance system application.Is that even relevant?
    I've heard that its not a big-complicated job to convert it to an applet.Heard where? Not that it is not correct - but you should probably ask the person who told you for more information.
    But I dunno how to do it.I just need a few guidelines.Google ( [url http://www.google.com/search?q=convert+swing+application+to+a+applet]convert swing application to a applet ).

Maybe you are looking for

  • Error message when installing over existing software.

    I built a LabVIEW installer that basically only installs the DAQmx drivers. This installer installed DAQmx 8.5. Because of the need to include a LabVIEW app with our software, I have rebuilt this installer and it now installs DAQmx 8.6 as well as the

  • Wifi problem with nokia x7 belle....

    i cant access my wifi with my nokia device when i connect it says connection failed or connection unavailable....

  • Options for QoS on 2 meg PPP lease line.

    Hi, I have a 2 meg PPP data lease line bet my HO and BO. I need to know the Qos options, I can configure to run voice over the same link. I want to reserve 384K to voice traffic. Will auto qos be of any help ? Thanks renzil

  • How to create application component in SAP R/3

    Hi gurus,              I have created one custom defined master data in SAP R/3.I need to replicate it in BW.So I need to create one application component by own.is it possible to create custom application component instead of assigning it to SAP R/3

  • How to set a form field focus

    Is there a simple way to set a form field focus... so basically on load the field focus is set to a specific field?  I know how to write it in javascript but was wondering if there is a simple way to basically select the field and click a button or t