Applet size question

<applet code="file.class" height=400 width=300>
</applet>
This is my html file related to a generic "file.java".
If I wanted that size to remain unaltered while the applet is running (basically if I want to fix the height and width of the applet, so that once it is displayed I cannot resize the window), I guess there is an instruction to handle this... Is there?
Tnx

The Java applet is an embedded object in your HTML page. This means that Java does not have direct controll over the browser window. In other words: there's no easy way to make Java stop people from resizing the browser window. There are two solutions for your 'problem'.
You could make your applet pop up a Java window (either AWT or Swing). Java has full controll over its own windows, so that will allow you to allow and disallow users any particular action. The downside is that -especially when using Swing- this is going to increase the filesize of your applet (and when using Swing, you also need to make sure visitors have the Swing libraries).
The other solution is making JavaScript pop up a child browser window in which you load the HTML page containing your applet. You can make JavaScript prevent people from resizing the child window.

Similar Messages

  • GetAudioClip() and applet size-related questions

    Hello everyone,
    I have coded a small animation and wanted to use audio file (.au) to add sound to my applet. But for some reasons it does not want to read my .au file. I tried different .au files, but with no result.
    I am using eclipse and while it (eclipse) compiles it creates 2 directory: src and bin and saves file.java and file.class in them respectively. I placed my .au file(s) in both of them......nothing happened. Though I added a .jpg file to these directories for the background to test how it works and it works fine with it. And not forget to mention that these .au files play fine without using java.
    Well, here is a bit of that code:
    public void init()
                   setBackground (Color.red);     
                   au = getAudioClip( getCodeBase(), "ecky.au"); //this does not play, though it plays in media player
                   im = getImage (getCodeBase(), "stars.jpg"); //this works, though both are in the same folder
    public void run ()
                   Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
                   while(y_pos != 200)
                        au.play(); //it should play here
                        y_pos ++;
                        repaint();
                        try
                             Thread.sleep (10);
                        catch (InterruptedException ex)
                             Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
    public void paint (Graphics g)
                   g.drawImage (im, 0, 0, this);
    }And one more thing, do you know where can I change the applet size? I mean as you know, eclipse take care of setting applet size. So where can I find this html code and resize the applet? Thank you in advance and appreciating your help....

    I wanted this .au file to play as long as the y_pos does not reach the point 200So, play() it before the while loop, and stop it afterwards (or whenever y reaches 200).
    To begin with you should just write some code to make the sound play - and if there is a problem with the size of the file, resolve that first.
    By the way, can anyone tell me where eclipse saves the html code for the applet? I don't think there is any html code. Eclipse uses an applet viewer. Try putting the html <aplet> information as a comment near the start of your file.

  • Setting applet size

    I know the answer to this question is possibly no, but I just thought of asking it anyway.
    Is there anyway in which an applet size can be set and remain static when the user tries to resize the applet by the use of the cursor?If this could be done it would save me alot of time.
    Thanks in advanced
    Dave

    ok a possible way
    try this
    <script language="JavaScript">
    function openWindow() {
    var newWin;
    newWin =
    window.open("abtest3.htm",
    "win1",
    "WIDTH=400,HEIGHT=400,screenX=100,screenY=100,left=100,top=100");
    newWin.focus();
    </script>
    put this in an html
    "abtest3.htm" is the html-file which contains the applet
    <body>
    click
    </body>
    this is to call the JS-function
    when you done this the window w/ the applet only will be iconifiable and closable
    regards

  • Applet Size/Object Size

    hello,
    why does the applet size / the object size when viewed in windows and linux is different. If the user uses Windows as the client PC the size is correct but when the same is viewed in Linux workstation its totally different. everything seems to be small. All the modules were created in windows but compiled and generated the fmx using linux and they are deployed in the linux server. Since the modules were developed in windows i understand there is some conflict with DPI and what we did was put a new parameter in the forwsweb.cfg and it worked. but that parameter has effect only if the browser is Internet Explorer. If i run the same using mozilla or firefox bcos linux workstation uses either mozilla or firefox. so what ever the values i specify for clientDPI no effect at all bcos the browser is not internet explorer. You might suggest me to develope everything in linux and set all the size there itself. But i cannot do that bcos we have more than 400 forms and developing or making changes is very very time consuming and its not practical for my situation.
    If you suggest me how to play around with the motiff settings in linux then I dont think the linux(fedora core1) is using those setting anymore.
    If any one can give me suggestions how to work around it that will be great.
    Thanks
    Blesson

    Blesson,
    is your client Linux, or the server. Linux as a client is not certified yet. For server issues, please contact customer support at metalink.oracle.com
    Frank

  • Applet size width and height = 100%

    Hello All.
    I am using the large font in windows. So I’ve change the applet size in formsweb.cfg file to width=100% and height=100%. Now the applet area fills the browser windows when I maximize it. But if I try to resize it using the mouse from the lower right corner. The form will be busy and never respond to any event and staying like this forever.
    Is there any one come across the problem?
    I am using
    Application server 10g (9.0.4)
    Form 9i
    Client PC (windows 2000)

    Ooookay ..... then how come I've got an demo of
    someone's applet here that does exactly this, i.e.
    draws outside of it's original size ?
    Show us the demo.
    How might they do it ? (dont really want to decompile
    someone else's class file, coz that's rude :-)Maybe someone will do it for you; the impossible has always attracted the human mind.

  • Problem: Applet Size

    Hello,
    We have developed an applet to be used on J3A080 JCOP31 v2.4.1 cards. The EEPROM size of the card is 80kb, and our applet size is around 40kb. If the applet size goes to 41kb. we are not being able to install it. There are no other applets in the card and this also happens with the simulator. It gives 6A80 (Wrong Data) error. However, if we try to install the applet as 40kb, it is installed successfully. What do we miss here, is it not possible to install an applet larger than 40kb into the 80kb EEPROM card ?
    Thanks in advance for your answers.

    I think that if the size of at least one component of the applet is geater then 32 K, then the upload is rejected. The cap contains the next components:
    Header
    Directory
    Applet
    Import
    Constant Pool
    Class
    Method
    StaticField
    Reference Location
    Export
    Descriptor
    Debug
    Total
    Most probably, the biggest component is Method component.

  • How to get Applet size in my form ?

    I'm running Oracle forms 11g, I want to center my window use the code below :
      v_app_width := TO_NUMBER(GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,WIDTH));
      v_app_height := TO_NUMBER(GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,HEIGHT));
      v_win_width := TO_NUMBER(GET_WINDOW_PROPERTY(p_window_name,WIDTH));
      v_win_height := TO_NUMBER(GET_WINDOW_PROPERTY(p_window_name,HEIGHT));
    -- message("width" ||v_app_width);
      SET_WINDOW_PROPERTY(p_window_name,POSITION,(v_app_width- v_win_width) / 2,(v_app_height - v_offset - v_win_height) / 2);This works for 6i but not working for 11g. As
    GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,WIDTH)returns 0.
    But once that message line is uncommented, the next form calling this center window procedure works fine.
    My problem is similar with this one : http://www.orafaq.com/forum/t/149809/2/ But it has no solution.
    I also found this : http://docs.oracle.com/cd/B14099_19/winitan.1012/relnotes.1012/relnotes/forms.htm
    5.1.4.1 GET_WINDOW_PROPERTY Returns 0 on Microsoft Windows
    GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,WINDOW_HANDLE) returns zero even with separateframe=true. Oracle Forms Online Help states that this should work on windows platform. This is incorrect as this Built-in does not support MDI. [Edited on 3/12 4:50pm] Today I found this code does work for my first form (login form) when the application launches. After login, the rest forms can be centered very well. Don't know what's the reason.
    So if this doesn't work, how could I get the applet size and center my window ?
    Edited by: frank1018 on Mar 12, 2013 4:53 PM

    If you want to center your window when MDI is maximized..
    first create timer.. under when-new-forms-intance..
    Declare
         timer_id   Timer ;
    Begin     
      timer_id := Create_Timer( 'laf_timer', 50, NO_REPEAT ) ;
    end ;use this in when time expired.. because it will not run this procedure in when-new-forms-instance or pre-form triggers..
    declare
         mh number;     rh number;     mw number;     rw number;
    begin     
                      If lower(Get_Application_Property( TIMER_NAME )) = 'laf_timer' Then
                             mh     :=     get_window_property(forms_mdi_window,height);
                        mw     :=     get_window_property(forms_mdi_window,width);
                        rh     :=     get_window_property('yourwindowname',height);
                        rw     :=     get_window_property('yourwindowname',width);     
                        set_window_property('yourwindowname',position,(mw/2)-(rw/2),0);  /* i make 0 for the value of Y.. for i liked it on the top but you can change it too */
              end if;
    end ;Edited by: ck on Mar 14, 2013 2:44 AM

  • Applet size to 100% of frame

    We have a Swing JApplet containing a JTree in a JScrollPane that's part of an HTML frameset. The applet needs to fill 100% of its frame on loading and then resize with the frame. I figured then the best way to do this would be to set width and height to 100% so the browser could handle it. This works great for Netscape, but IE seems to either add a vertical scrollbar or leave whitespace for it to the right of the applet and not fill the frame completely.
    Is there some way around this or some better way to make JApplet size and resize correctly?
    Thanks!

    Sure! FYI, we use JavaScript document.write() calls to output the HTML for the frameset, but I removed so it would fit here better. The code in question is part of navigation.jsp (see below):
    <FRAMESET id="MainFrameLayout" name="MainFrameLayout" rows="60,*" border="0" frameborder="0">
    <FRAME name="banner" id="banner" src="banner_ae.html" scrolling="no" frameborder="0" marginheight="0" marginwidth="0">
    <FRAMESET id="FrameLayout" name="FrameLayout" border="0" frameborder="0" cols="180,*">
    <FRAME name="menu" id="menu" src="navigation.jsp" frameborder="0" marginheight="0" marginwidth="0" style="border: 1px solid #acacac;">
    <FRAMESET id="RtFrameLayout" name="RtFrameLayout" rows="0,0,*" border="0" frameborder="0">
    <FRAME name="ssh" id="ssh" src="/blank.html" scrolling="auto" frameborder="0" marginheight="0" marginwidth="0">
    <FRAME name="wiz" id="wiz" src="/blank.html" scrolling="auto" frameborder="0" marginheight="0" marginwidth="0">
    <FRAME name="text" id="text" src="action/homePage" scrolling="auto" frameborder="0" marginheight="0" marginwidth="0">
    </FRAMESET>
    </FRAMESET>
    </FRAMESET>

  • IMovie 6 HD - Export Movie Size Question

    There is a confusing list of movie export size options that I need to get your clarification about. Some of the selections seem to be similar.
    To see what I am referring to go into iMovie HD 6, under the SHARE menu, go to Save Movie For: Expert Settings Export Settings > Select Movie to QuickTime Movie (then hit the options tab to the right > Under the Video Section, select SIZE - note the Export Size Settings - DImensions drop down list. Note there are two sections. The last two items in the top section listed are (exactly worded as) 1280 x 720 HD and 1920 X 1080 HD. In the bottom section the last three entries are HD 1280 x 720 16:9, HD 1440 x 1080 16:9 and HD 1920 x 1080 16:9. What's the difference, for example, between the 1280 x 780 HD and the bottom one HD 1280 x 780 16:9? I ask because my HD camcorder movie footage (shot at 1080i, 29.97, 16:9) with an HV30 exports smooth at 1280x720 HD but jerky at HD 1280 x 780 16:9. They sound the same, but one is jerky and one smooth.
    The other question I have is 1440x1040 is 4:3 ratio. But it exports at 16:9 aspect ratio. I don't understand why.

    Donna:
    While I have a lot of video editing experience with an SD digital camcorder, the Canon HV30 HDV cam is new to me. So I am experimenting. That said, footage that will be shot will end up in a couple of places. Some of it will be passed onto my company's web master for posting to the web in some kind of Flash video format. Other video will be used in Keynote presentations as full screen video clips. Others will be used as source video for creating 4x3 SD clips for PowerPoint on a PC by others. So, the video will be used in different formats. (In what format to shoot is another question, but I have concluded (I hope correctly) that I should just shoot HDV 1080i since it seems to be the easiest to deal with for uploading to iMovie6 HD.)
    The purpose of my inquiry was to determine what the various selections are used for and what they do. Sometimes the video is jerky, sometimes an identical movie size is smooth (but must be rendered or processed differently). I was only trying to determine why there appeared to be repetative choices in the list of movie sizes as I mentioned in my original post. To be blunt, iMovie 6 HD documentation is spotty at best. The O"Reilly books don't cover the hard parts.

  • IMac (24-inch, Early 2009) Hard Drive Replacement: Hybrid and Maximum Size Question

    I have a 24-inch iMac, early 2009 model and the internal hard drive has died so am looking to replace it and also upgrade it in the process.
    At the moment the broken internal drive was the standard 1TB model that comes with the computer. I have been doing a little bit of research and I'm liking the sound of a hybrid drive as they seem to be a relatively economical was of achieving close to SSD speeds. I've been looking particularly at 'Seagate ST4000DX001 DESKTOP SSHD 4TB SATA 6GB/s NCQ NAND 8GB 64MB HYBRID' for the replacement. I guess my question is if this drive will work in the iMac. Does a hybrid drive present and problems? Also, is there a limit to the maximum size the replacement drive can be? Will 4TB exceed this limit? Lastly, I understand this drive uses SATA III to connect with the computer, which is backwards compatible (I think?) so I'm presuming this will work in my iMac?
    Thanks in advance.

    The hybrid drive will kinda sorta be as fast as an SSD. The newest Seagate Hybrid is quite intelligent about caching the most often used files in flash and is quite an improvement over the first iteration. I used both the first and second generation drives in my 2007 iMac and was quite impressed with their performance…until I installed an SSD. The problem with the hybrids is that they just don’t have enough flash and no matter how intelligent the drive is it is guesswork so sometimes you’ll find the drive access just as pokey as any other 5400 RPM drive and then other times very fast.
    For about $200 it is a decent upgrade but with SSD prices having dropped nearly 50% in the last 18 months it is worth considering a smallish internal SSD for the OS and applications and an external drive for data.

  • Is there a way to adjust popup applet size according to applet contents so that I dont have to scroll ever?

    Hello,
    Could anyone please let me know if there is any way to adjust the popup size according to contents displayed in the popup so that I dont have to scroll in the applet.
    Thanks.
    Nanta

    Sorry mate, cant post a screenshot as the site is client confidential...can get me in trouble.
    its just that default width of the popup is 300px(using inspect element); but when the popup opens, some of the buttons are not visible and I have to scroll horizontally to see these.
    I was looking for something wherein I can permanently set the popup width to 700px.
    Any help is appreciated. Thanks.

  • File size questions

    new to Apple MAC and iPhoto...so....I shot my new camera in jpeg, files are roughly 20mb...then I shot in RAW and after editing, the saved jpegs are ~ 5-10mb and up to 15mb....what happens to make this discrepency? how could my RAW converted jpegs be ~ 1/3 the size of straight out of camera jpegs?
    another question...iPhoto is 1.7 gb, my iPhoto Library size it 37gb, but my pictures in iPhoto total 17gb.....is the discrepecy due to stuff like Slideshows I created? Faces just is referring the files right, not making duplicate files?...having trouble wrappping my head around stuff I''m seeing that doesn't add up...
    thanks

    It's all a bit more complex that that. There is no correlation between file size and the quality of a shot. A well exposed shot of 2 or 3 mb will print just as well as a well exposed shot of 25mb. There is no difference in what gets printed. A poorly exposed shot of 25mb will print like garbage.
    It gets worse, we used to suggest a rule of thumb that printing at 300dpi was a reasonable giude to printing quality. Not any more. Printers and cameras have improved, iPhoto books are uploaded at something akin to 150 dpi.
    Again, a 3 mb jpeg will print exactly as well as a 30 mb tiff.
    Remember, the internet is full of high quality images that weigh in at a lot less than 500kb.
    Where file size comes into play is when you're using destructive editing on a lossy format, like Jpeg, and, as I said above, that doesn't come into play in a non-destructive editing system like iPhoto.
    The output from the export will - depending on the settings you use - either be smaller or larger than the jepg from a camera. It means very little - unless you're going to go an an edited destructively.

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

  • Simple applet jar question

    I'm sure this is an easy question, but how do you access subdirectories in your applet's jar file?
    For instance the contents of MyApplet.jar jar would be:
    * META-INF
    * images
    * net
    Say the main class is MyApplet.class in net/mydomain/myproject
    How in the main class would I get at images/MyImage.jpg?
    Obviously I did not get this code to work:
    ImageIcon upIcon = new ImageIcon("images/MyImage.jpg");
    Thanks alot!

    Actually now I am using:
    ImageIcon upIcon = new ImageIcon(MyApplet.class.getResource("/images/MyImage.jpg"));
    This way the 'absolute' resource is found (becuase the resource name starts with a '/').
    This seems to be the best way to do it.

  • Oracle Block Size - question for experts

    Hi ,
    For years i thought that my system block size was 8K.
    Lately due to an HPUX Bug i found that the file system block size is gust .... 1K
    (HP DocId: DCLKBRC00006913 fstyp(1m) returns unexpected block size (f_bsize) for VXFS )
    My instance is currently 10204 but previously was 7.3 --> 8 --> 8174 --> 10204.
    Since its old instance its block size is gust 4kb.
    We are planing to create new file system block size of 8k.
    The instance size is about 2 TB.
    Creating the whole database with 8 kb is impossible since its 24*7 instance.
    Do you think that i sould move gust few important tables to a new tablespace with 8k block size , or should i leave it with 4 kb ?
    Thanks

    Given that your Oracle Database Block_Size (4K) is a multiple of the FileSystem Block_Size (1K), there should be no inherent significant issue, as such.
    Yes, it would have been nice to have an 8KB Oracle Database Block_Size but whether you should recreate your FileSystems to 8KB is a difficult question. There would be implications on PreFetch that the OS does and on how the underlying Storage (must be a SAN, I presume) handles those requests.
    A thorough test (if you can setup a test environment for 2TB such that it does NOT share the same HW, doesn't complicate PreFetches in the existing SAN) would be well adviced.
    Else, check with HP and Veritas support if there are known issues and/or any Desupport plans for this combination ?!
    Oracle, obviously, would have issues with Index Key Length sizes if the Block Size is 4KB. Presumably you do not need to add any new indexes with very large keys.
    Having said that, you would have read all those posts about how Oracle doesn't (or really does ?) test every different block-size ! However, Oracle had, before 8i, been using 2K and 4K block sizes. Except that the new features (LMT, ASSM etc) may not have been well tested.
    Since you upgraded from 7.3 in place without changing the Block_Size, I would venture to say that your database is still using Dictionary Managed and Manual Allocation and Segment Space Management Manual ?
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

Maybe you are looking for

  • To find total in blocked alv

    hi experts, i have created blocked ALV program. in the o/p , it displays list of recors for open items,then list of records for cleared items. now i want it  to display sum of both open and cleared items of particular column. in grid display it is di

  • Menu Exit for VL01N

    Hai Friends, Greetings. I need to add one text box or small variable window in the standard transaction VL01N,, for this any User Exit or Customer Exits are there? IF its avaial means pls help me to guide me the step by step procedures.... Please its

  • How can convert HTML file into xml file?

    Hi, I am receving one HTML file as an input and i want to convert that receiving(html file) into .xml file.Is there any converter (tools)to do this.Pls if any give me the details with regard. Regards, mahesh.

  • Special movement indicator determination WM

    Dear experts, Apart from the automatic retrieval from the material master and the manual setting during goods movement is it there any change of determining the special movement indicator by using a customer exit? Thank you in advance. Edited by: Edi

  • How can I clear the common line information

    My program need to clear up the inforamtion in dos promp,which java method can clear up screen