Determining Applet Window location

How can I get the actual window position of the root applet window (The Browser window, actually).
No matter where I place the browser window, the root window always reports 0,0 for x,y (as shown below).
I like to popup my dialogs centered in my applet, but that only works if the browser is displayed in the
upper left corner of the display. As soon as the user moves it, the information below is incorrect.
root window sun.beans.ole.OleEmbeddedFrame[frame0,0,0,730x480,invalid,layout=java.awt.BorderLayout,resizable,title=]

Use the following to find your applet x,y locations on the screen:
int x=this.getLocationOnScreen().x;
int y=this.getLocationOnScreen().y;
where this is the component whose screen coordinate is desired -- the example shown above can be used in the applet's init method.
V.V.
PS: you may have to include the following in your source file:
import java.awt.*;

Similar Messages

  • How to get rid of "Warning: Applet Window" in third party java applet code

    Hello I am having a hard time figuring out how to disable this darn Warning applet window that pops up and says "unable to detect an audio device" when it loads onto a comp that has no sound card! It is an audio streaming applet which was discarded by the developer and he does not provide any support for it....
    I know zero about java and I am figuring this is something simple that any typical programmer familiar with java could figure out in five minutes.....
    the applet is called audio centric and is located here:
    http://javaboutique.internet.com/AudioCentric/
    I appreciate anyones time who could help me out!

    Sorry, there is not source code deployed and I'll not encourage you to decompile it, instead contact developer. They will appreciate very much your claim.
    Regards.

  • How does the jvm handle drawing images outside an applet window?

    I have a question about an applet I want to optimize.
    Essentially the applet allows the user to scroll through a large map while viewing only a small portion of the map through the applet window.
    The map has a large array of circles with coordinates on the map that are drawn in their appropriate place in the applet window when the user scrolls the map.
    As it stands, the paint method loops through every circle in the array to draw them, but most of them are not visible in the window and end up getting drawn in a negative coordinate or a very large coordinate.
    My question is are these circles that are not seen in the applet window but are still calling drawCircle in the paint method putting a strain on the computer's graphics card?
    Would it be better if I looped through all circles and only called the drawCircle method on circles whose coordinates would be visible? Or would the extra step of checking each circle's coordinates before drawing be not worth as efficient?
    Any help would be appreciated.

    If the amount of stuff being rendered outside of the clip rectangle is small then it's usually not worth it to attempt to figure out what's being clipped and not draw it. If the clip rectangle represents only a small portion of the entire canvas that can be drawn, however, it's usually worthwhile to put in some logic to only draw what is necessary.
    Take JTextArea, for example. It could be displaying a text document thousands of lines long. Instead of rendering every line of text on every repaint operation, it contains the following logic:
    1. Get the current clip bounds (i.e. what part of the text area is "dirty" and must be repainted).
    2. Figure out what lines are displayed in the clip bounds. Some lines may be only partially visible (a line "halfway" scrolled down), but they need to be repainted too. If word wrap is disabled this is a very quick and cheap operation, but if word wrap is enabled, it's a little more complex.
    3. Only repaint those lines.
    This way, in the best-case scenario JTextArea only repaints a single line (the line the user is typing in). Worst case, it repaints the number of lines that can fit on the screen. But it never repaints too much.
    Anyway, I guess my advice would be: If it's cheap and easy to determine if something is out of the clip bounds, do it. If it's difficult to determine, do it only if you have a noticeable performance issue in your rendering code.

  • Batch Determination at Storage location Level

    Dear All,
    I have one question on batches when I am entering stock against batches in Outbound Delivery Note (as batch split ) the batch determining the storage location is different not the one which it belongs to, I need the batch stock should be determine in same storage location not the different one.
    For example: I have 5 storage locations, each storage location contain 5 to 6 batches;
    Storage Location: WO1, WO2, WO3, W04 AND WO5
    Batches: A1,B1,C1,D1,E1 etc.
      Stor. Loc    Batches
    1. W01:             B1, B2, B3, B4, B5, B6
    2. W02:             A1, A2, A3, A4, A5
    3. W03:             C1, C2, C3, C4, C5
    4. W04:             D1, D2 D3, D4, D5
    5. W05:             E1, E2, E3, E4, E5
    I. If I enter B1 and stock 10kg then it automatically determining storage location as W02. Actually it belongs to storage location W01 it should be the same W01only
    II. If I enter C1 and stock some 15kg then also it automatically determining storage location as W02. Actually it belongs to storage location W03 it should be the same W03.
    Kindly give me the solution.
    Thanks in advance
    Regards,
    MH

    Clsing due to no reply

  • ATP and Route Determination at Storage Location Level

    Hi Experts,
    I'm working on a project currently and one of the requirements is to have ATP and Route Determination at Storage Location level. I know SAP standard for this is at plant level but was wondering if anyone has had this requirement before, and if so what course of action they took to solve this issue.
    Any help would be greatly appreciated.
    Thanks,
    Mark

    Hi Mark,
    in my previous project we have a customized table created for all the route determination and used mv45afzz move field to vbap to determined the route.
    not sure if there is a easier solution but at least it is doable through customization for sure.

  • I have updated my iTunes to the newest version, 10-25 on a windows XP system. Now my java virtual machine is not working and I need it to run applet window. My Java is also newest version. What can I do to fix/repair my issue?

    I need help with java on windowsXP after updating iTunes to the latest version. My java will not work and I get error message need java virtual machine to run applet window. Did not have this problem prior to the iTunes update.
    Please help, Thanks

    If your library was working on your computer and then popped up empty all of a sudden then this might be what you need...
    Empty/corrupt library after upgrade/crash
    Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
    See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
    When you get it all working make a backup!
    tt2

  • Javascript with window.location.href no longer working in Content Editor in Sharepoint 2010 where users have IE8

    I have recently found that when using a Sharepoint 2010 Content Editor web part to house some Javascript that the window.location.href (or window.location) is not working when the end users have IE8 installed on their PC's.  We have confirmed
    that the window.location.href is working if the users are on IE7 or Google Chrome with the same Javascript.  In addition, we added alert() to the javascript to ensure that it was infact running, which the alerts appeared on the screen with no issues. 
    The result that I am receiving in IE8 is that when the window.location.href is set to the url that the user should be directed to, it simply refreshes the current page and leaves the user where they originally were.
    I have seen the posts to have my site setup as a Trusted Site, but this is not an option for our company as they defined all internal Sharepoint sites as trusted already.  Besides this, having all users go into their Internet Options is not really a
    solution but a means to annoy your users.
    What I am looking for is a permanent solution that I can make within my javascript that will work for both IE7 and IE8 users within a Sharepoint 2010 environment.  If anyone has any suggestions, please let me know.  Thanks in advance.
    Below is a snipet from my javascript code for review:
    <script type="text/javascript">
    function RedirectUrl() {
    alert('button pressed');
    var tb = document.getElementById("tbSearch").value;
    var cs = document.getElementById("sfield").value;
    var url = "";
    if (tb != "") {
    url = "FilterName=" + cs + "&FilterMultiValue=*" + tb + "*";
    if (cs == "Request%5Fx0020%5FID1"){
    alert("Request%20ID%20Search.aspx?" + url)
    window.location.href = "Request%20ID%20Search.aspx?" + url;
    else {
    window.location.href = "All%20Requests.aspx?" + url;
    else {
    return false;
    function ClearUrl() {
    window.location.href = "All%20Requests.aspx";
    </script>
    <br/>
    <span style="font-family: calibri; color: #000066; font-size: 14pt; font-weight: bold">Search</span>
    <br/>
    <span style="font-family: calibri; color: black">Search Field: </span>
    <select id="sfield" style="font-family: calibri; font-size: 10pt">
    <option value="Request%5Fx0020%5FID1">Request ID</option>
    </select> &#160;
    <span style="font-family: calibri; color: black">Search Text: </span>
    <input id="tbSearch" onkeypress="if (event.keyCode == 13) document.getElementById(&#39;btnSearch&#39;).click()" style="font-family: calibri"/>
    <button id="btnSearch" onclick="return RedirectUrl();" type="submit" style="font-family: calibri">Search</button>
    <button id="btnClear" onclick="return ClearUrl();" type="submit" style="font-family: calibri">Clear Search</button>
    <br/>
    <br/>
    <span style="font-family: calibri; color: #000066; font-size: 14pt; font-weight: bold">Search Results - All Requests</span>
    <br/>

    Hi,
    According to your post, my understanding is that the window.location.href not worked in IE 8.
    I think the issue
    is likely due to the value of your variables. If they contain special or invalid characters, those needs to be passed through
    encodeURIComponent before being assigned to window.location.href.
    http://stackoverflow.com/questions/18278777/window-location-href-not-working-on-ie
    http://stackoverflow.com/questions/6297291/window-location-problem-in-ie
    You can also use the following methods to check whether it works.
    Window.navigate();
    Winodw.history.back();
    Self.location.href;
    Top.location;
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Is it possible to use Powershell to determine if Windows Server Source Files are present on disk?

    Hi everyone,
    I would like to know if it is possible to use a Powershell cmdlet to determine if Windows Server 2012 (R2) Source Files are present on disk.
    We are using an automated PS script to install roles and features and some registry keys and applications afterwards. If the Source Files are not present, the script will fail, so I would like a# Check if Source Files are present # stage built in
    the script to determine if the source files are present or that an alternate source path needs to be used.
    Is this possible with Powershell and if so, how can we achieve this?
    I'll appreciate your answer.
    - Rob

    Hi Rob,
    I assume that you are using powershell command "install-windowsfeature" .
    I would suggest you add the parameter "-source" to specify the alternate path of thesource file .
    " The path specified in this parameter is only used if the command cannot find feature files in the local side-by-side store of the specified target computer or VHD. "
    For details please refer to the article below :
    https://technet.microsoft.com/en-us/library/jj205467(v=wps.620).aspx
    Best Regards,
    Elton Ji
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] .

  • Enterprise control for Windows Location Services/Provider/Privacy in Windows 8.1

    Hi All,
    Is there option (Group Policy/Registry) in Windows 8.1 to disable users to Enable or Disable (one word: control) Windows Location/Privacy global options for Metro/Windows Store/Windows Store LOB Applications?
    Is there option (Group Policy/Registry) in Windows 8.1 to disable users to Enable or Disable (one word: control) specific application
    in Windows Location/Privacy options for Metro/Windows Store/Windows Store LOB Applications?
    Thank you in advance.
    Regards,

    Hi,
    According to your description, I guess APP locker maybe helpful.
    By using APP Locker, you can:
    1. Define rules based on file attributes that persist across application updates, such as the publisher name (derived from the digital signature), product name, file name, and file version. You can also create rules based on the file path and hash.
    2. Assign a rule to a security group or an individual user.
    3. Create exceptions to rules. For example, you can create a rule that allows all users to run all Windows binaries except the Registry Editor (Regedit.exe).
    4. Use audit-only mode to deploy the policy and understand its impact before enforcing it.
    5. Create rules on a staging server, test them, then export them to your production environment and import them into a Group Policy Object.
    6. Simplify creating and managing AppLocker rules by using Windows PowerShell cmdlets for AppLocker.
    For more details about APP Locker, Please refer to the link below:
    http://technet.microsoft.com/en-us/library/hh831440.aspx
    Roger Lu
    TechNet Community Support

  • Java Applet Window Warning - Appearing through

    Hello
    The warning that is displayed on applet windows now when using java is causing a problem.
    When you bring a fresh web page or word document over the top of the applet window, the java applet warning is still visible as if it has been brought to the front layer. but the rest of the applet is behind the new active window.
    Really weird.
    Ben.

    Our team is also using a signed applet and are having trouble with popup items not being accessible outside of the JFrame.
    In appletviewer the popup (JXDatePicker) is fully accessible. If running in Internet Explorer on Windows 2000 the portion of the popup outside of the JFrame paints correctly but cannot receive click events correctly.
    It would be preferrable that if the popup cannot receive events outside of the applet frame that the popup would be smart enough to pop itself fully in the applet frame.
    Any suggestions?
    Thank you.

  • Java Applet Window

    I'm not a developer,and this is probably the wrong place to post this. It's really a small, silly thing....but I play Literati on Yahoo, and all of a sudden, across the bottom of my screen blocking the chat screen is a bar that says Java Applet Window.....how do I get rid of this???

    See my posting on the JDev Forum :-)

  • Java applet window blocking yahoo games

    not a devloper, but I really need some help handling this java problem. when I log onto yahoo games, bar that says "java applet window" blocks the bottom portion of the screen. how can I get rid of this?

    i found out how to get older verison of java6-7 verison .
    Go to search bar type in OpenOffice.org 3.0 and download this.it will take about 30 minute to download this file.after download this go to add & REMOVE PROGRAM to see if download and if did delete java 6u10 version . email me at [email protected] to see it work

  • Java Applet Window showing on signed applet popups

    I have an applet deployed that is signed, but I'm experiencing a very annoying problem with JPopup windows that cross outside the border of the JFrame created by the Applet.
    Those pop-up windows still show the warning at the bottom "Java Applet Window". That part is pretty annoying and I don't understand why it's doing that since they are coming from a signed, trusted applet.
    Just to be clear, any of the JPopups or JDialogs or anything else we display inside the frame doesn't have this warning since we signed the applet.

    Our team is also using a signed applet and are having trouble with popup items not being accessible outside of the JFrame.
    In appletviewer the popup (JXDatePicker) is fully accessible. If running in Internet Explorer on Windows 2000 the portion of the popup outside of the JFrame paints correctly but cannot receive click events correctly.
    It would be preferrable that if the popup cannot receive events outside of the applet frame that the popup would be smart enough to pop itself fully in the applet frame.
    Any suggestions?
    Thank you.

  • Purchase info record for PO determine by Storage location

    Dear Guru,
    Can you please advice when during the creation of PO, is there possible to determine the Purchase info record by the Purchasing Org, material, Vendor as well as "Storage Location".
    Reason,
    Sometime we need to raise the PO those customer who will be exempted from the governamt VAT or duty which the goods has to delivery to the country Bonded warehouse.
    I created 2 Storage location;
    1.) 1000 for general WH
    2.) 2000 for Bonded Wh
    So i would like to know if we can create 2 different info record determine by Storage Location?
    Thank you very much,
    Regards
    Chee Wee

    Hi
    In Standard SAP it is not possible

  • Using separate_frame=true and trying to close the applet window after...

    We are using separate_frame=true and trying to close the applet window (the one with the large gray box) after using the following post-form trigger:
    if :system.last_form = 0 then     
         message('Please wait while Forms closes - '||:system.last_form);     
         web.show_document('/forms/html/close.htm','_self');     
    end if;
    This works fine for the first form we open, but if that same form using Open_Form to open a child form we have a problem. When the child form is closed the user is returned to the parent calling form (which is expected), but then when the parent form is closed the separate applet window fails to close. Any suggestions?

    I guess you mis-interpreted the value of :SYSTEM.LAST_FORM. From the online-help:
    SYSTEM.LAST_FORM represents the form document ID of the previous form in a multi-form application, where multiple forms have been invoked using OPEN_FORM.So LAST_FORM shows always the ID of the last activated form, and this will never be 0 if you issued one OPEN_FORM in your application.

Maybe you are looking for

  • Wrong Release strategy in purchase order

    Hi, I have a specific purchase order with wrong release strategy. I had been creating others documents with the same total value and the release strategy work correctly. The release strategy configuration are right. How I can correct the release stra

  • How do I get rid of this blue circle on the top left corner of my window?

    I had just installed OSX mavericks for my macbook and now whenever I open up firefox there's a weird blue circle in the top left corner of the firefox window.

  • Make net price field in me12 modifiable.

    How to make net price field in me12 modifiable. I have screen Layout & Screen variant but didnt get any clue.

  • I Pod Classic Recently Added Playlist

    Hi, Accidently I deleted my "Recently Added" playlist folder on my I Tunes page and therefore my I Pod. Can I get a new Recently Added playlist back and have my future Recently Added tracks automatically go into this folder as they did before? Thanks

  • Low sound in vista

    hi guys i have just reinstalled vista, and now i installed all the stuff of mr. daniel_k for audigy 2 zs but the sound is too low, much lower than before - 50% or more ( i had my zs unrecognized once by vista but before reinstalling vista), now i mus