Draggable window only works in MS JVM, and not Sun?

Hello all,
Our applet needs to support the MS JVM (and therefore Java 1.1). I have been looking to create a draggable Window to replace a Frame that we have since we want the frame to be 'undecorated' (no minimize button, etc). I found some code on this forum to create a draggable window which works fine. But, I would like to create my own title bar on the Window and only have that draggable. When I add the same listeners to the Label instead of the Window itself, the dragging no longer work so well in the Sun JVM, while it works fine in the MS JVM. The problem I am seeing is that if I don't drag slowly it skips, or doesnt drag. Note, I am only seeing this when adding the drag listeners to the Label in the Window, but this works fine when the listeners are on the Window itself. Also, this works fine in the MS JVM. Any ideas? For example, the code below is what has the issue in Sun JVM, but if I replace the 'title.' to 'this.' on the 2 listeners adds, I can drag the window fine in Sun JVM.
Thanks for you help,
Aaron
public class TestWindow extends Window {
        Label title;
        int width=300;
        int height=300;
       Point origin = new Point();
        TestWindow() {
            super(new Frame(""));
            this.setBackground(Color.blue);
            title = new Label("Draggable window");
            title.setBackground(Color.gray);
            //setLayout(new BorderLayout());
            add(title, BorderLayout.NORTH);
            title.addMouseMotionListener(new MouseMotionAdapter() {
                public void mouseDragged(MouseEvent e) {
                    Point p = getLocation();
                    setLocation(p.x + e.getX() - origin.x,
                                p.y + e.getY() - origin.y);
            title.addMouseListener(new MouseAdapter() {
                public void mousePressed(MouseEvent e) {
                    origin.x = e.getX();
                    origin.y = e.getY();
            this.setSize(width, height);
            this.show();
    }

Sorry, I didn't read your post carefully the first time.... My suggestion would be to add listeners to both the label and the window, although that would make the whole window draggable. To nullify that effect, you'd have to put another component in the main part of your window (Like a JPanel if you could use Swing) and have it eat up any mouse dragged/clicked events that it receives.

Similar Messages

  • Does airplay mirror only work with the ipad2 and not ipad1

    does airplay mirror only work with the ipad2 and not ipad1

    But can it still stream video wirelessly?
    For example, with the Digital AV Adapter I can watch video on my TV, but obviously it's wired.
    I'd like a wireless option.

  • Why do some of my apps only work ón my iphone and not ón my iPad ?

    Why do some of my apps only work ón my iphone and not ón my iPad ?

    That should work on the iPad. Basic app troubleshooting from Apples support site. Items 1, 2 & 3 should not apply to your situation, but I posted the link at the end if you want to read them.
    4. Restart the application
    If the issue affects only a single app, try closing just that app:
    Press the Home button to return to the Home screen.
    Double-tap the Home button to display recent apps.
    Tap and hold the affected app until the red minus appears.
    Tap the red minus to quit the app.
    Press the Home button, then restart the app.
    5. Restart your device
    Hold the Sleep/Wake button until "slide to power off" appears. Slide to power off your device. When it is off, press the Sleep/Wake button to turn it back on.
    6. Reinstall the affected application
    Remove the application from your device and reinstall it.
    Touch and hold any application icon on the Home Screen until the icons start to wiggle.
    Tap the "x" in the corner of the application you want to delete.
    Tap Delete to remove the application and all of its data from your device.
    Press the Home button.
    Go to the App Store.
    Search for the application and then download it again.
    Note: If it is a paid app, ensure you are using the iTunes account you purchased the app with originally. If it is not, you will be charged for the app again. For more information regarding downloading previously purchased items, see this article.
    7. If the issue is still unresolved
    If you continue to experience the issue, contact the developer of the application for further assistance.
    http://support.apple.com/kb/TS1702

  • How come the numeric keypad only works in log-in and not in normal progs?

    I've searched this forum for all things numeric keypad related and come up blank on this problem so I'm putting this question out there for anyone else who knows the answer.
    The numeric keypad on my iMacs only work it seems in typing in numbers in the password box at log-in, but in any other program, including Safari, I get nothing when I push those keys. Why is this and how can it be easily corrected with or preferably without the use of strange hacks if this is not some kind of missed setting? This one really bothers me. Why have a keypad at all if it isn't useful the majority of the time? I find the same problem on the Aluminum and plastic, wired, and wireless versions of the keyboard. If Apple didn't intend us to use the keypad in substitute for the number keys whenever we feel like it, wouldn't it make more sense to downsize the keyboards and sell them without one? The keypad only seems to work when set for use as a mouse-substitute, and nothing else.

    It's strange that it doesn't work on my desktops, but it works fine on my MacBook (but of course I have to use the f(x) key to make it work on that because it isn't really a separate keypad).
    Does anyone have any idea what settings under Tiger could cause the keypad not to function? It seems the problem is Tiger-related as the Leopard desktops don't exhibit the same problem.. Which keyboard is connected and by what method does not seem to make a difference.

  • Ipad air will only work with email address and not phone number

    Nobody can FaceTime me or message me using my telephone number, they can only do it using my email address, how do I get my phone number to work on ipad air

    Do you have an iPhone?
    You can only associate a phone number to messages and facetime if you have an iPhone.
    The iPhone will associate the number it has to your Apple Id which in turn will make it available to Facetime and Messages on the iPad, assuming it uses the same Apple ID.
    If you do have an iPhone, make sure you've activated Facetime and Messages on it so your Apple ID links to your number.

  • My macbook pro screen only works on the top and not bottom. I just woke up to that,what could be the issue?

    I just woke up this morning to half my screen not working .all it shows is color lines on the bottom half. Also it was working perfectly yesterday. Please help

    Reset PRAM.  http://support.apple.com/kb/PH4405
    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the method for:
    "Resetting SMC on portables with a battery you should not remove on your own".
    If this does not help, contact Apple.

  • How can I add a new Template to My Templates in Pages? I've read most of the discussions on the subject but it doesn't work for me. By the time I reach the Templates folder, I only see templates for Numbers and not for Pages. Need help, please.  Thanks

    How can I add a new Template to My Templates in Pages? I've read most of the discussions on the subject but it doesn't work for me. By the time I reach the Templates folder, I only see templates for Numbers and not for Pages. Need help, please.  Thanks

    Si vous avez utilisé la commande Save As Template depuis Pages, il y a forcément un dossier
    iWork > Pages
    contenant Templates > My Templates
    comme il y a un dossier
    iWork > Numbers
    contenant Templates > My Templates
    Depuis le Finder, tapez cmd + f
    puis configurez la recherche comme sur cette recopie d'écran.
    puis lancez la recherche.
    Ainsi, vous allez trouver vos modèles personnalisés dans leur dossier.
    Chez moi, il y en a une kyrielle en dehors des dossiers standards parce que je renomme wxcvb.template quasiment tous mes documents Pages et wxcvb.nmbtemplate à peu près tous mes documents Numbers.
    Ainsi, quand je travaille sur un document, je ne suis pas ralenti par Autosave.
    Désolé mais je ne répondrai plus avant demain.
    Pour moi il est temps de dormir.
    Yvan KOENIG (VALLAURIS, France)  mercredi 23 janvier 2011 22:39:28
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • Program only coverted half my PDF and not working, Please refund me

    Program only coverted half my PDF and not working, Please refund me

    Hi,
    I am sorry that it did not work for you.
    May i know is this happening with all files?
    Would it be possible for you to send me the document so that i can check what is the actual issue.?
    Regards,
    Florence

  • Outlook 2011 works on 1 network and not on the other

    Hello guys,
    I just purchased a Macbook Air and MS Office 2011 for Mac. I setup the computer while I was at work (using a wireless network) and was able to get all my emails in perfect order.
    However, once I got home (on my home wireless network) when I hit Send/Receive, I get the "Authentication Failed Error 17900" message.
    I must add that I have 5 different accounts setup, 4 are my personal domains and one is Gmail. Gmail works fine on outlook both from my office and home.
    I tried changing many settings in Outlook, but nothing seems to work. I'm not really good with these things, but my logic tells me that if everything works in the office and not at home, it must have something to do with my router at home! Could this be the case? Can anyone help me please? My office is an hour away and I hate to go there just to check or send emails.
    Thanks in advance for your help.

    Hi,
    Thanks for taking the time to help me out.
    What I did was, I connected my other laptop directly to the internet cable, and everything seemed to be working fine (I had the same issue on my windows laptop)
    So, I jumped to the local Apple Store and picked up an aiport extreme and voila! everything runs smooth now
    Thanks again, I appreciate your help.

  • The display on my iPhone only works vertically.  It will not change when I rotate my phone.

    The display on my iPhone only works vertically.  It will not change when I rotate my phone.

    Swipe up on the bottom of the screen to expose control center and see if the orientation lock is on (top row of controls, far right; looks like a lock with a circular arrow).
    Not all apps support orientation changes, BTW.

  • My apple id password only works on my mac but not on my iPhone or iPad

    my apple id password only works on my mac but not on my iPhone or iPad what do i do?

    Welcome to the Apple Community.
    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")
    Providing you are simply updating your existing details and not changing to another account, when you delete your account, all the data that is synced with iCloud will also be deleted from the device (but not from iCloud), but will be synced back to your device when you login again.
    In order to change your Apple ID or password for your iCloud account on your computer, you need to sign out of the account from your computer first, then sign back in using your updated details. (System Preferences > iCloud, click the sign out button)

  • Code works with Dreamweaver CS6 and not with CC

    <p><a href="javascript:void(0)" onclick="window.open('http://www.anything.comt', '', 'top=20,left=20,toolbar=0,statusbar=1,scrollbars=1,resizable=1')" title="title">name</a></p> works with Dreamweaver CS6 and not with CC
    [Edited Title and moved to Dreamweaver- JTS]

    I'm not quite sure I understand your point.
    I have just tested the Open Browser Window behavior in Dreamweaver CC. It creates slightly different code from Dreamweaver CS6, but it works correctly. This is what is created in the HTML:
    <p>my <a href="#" onClick="MM_openBrWindow('http://www.adobe.com/','mywindow','toolbar=yes,location=yes,status=yes,menubar=yes,scrollb ars=yes,resizable=yes')">link</a>
    </p>
    Dreamweaver CC also adds the following code to the <head> of the page:
    <script type="text/javascript">
    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    </script>
    The definition of the MM_openBrWindow() function is needed in the <head> for the code to work. But it definitely works OK.
    With regard to _self and _blank not working, I can't find any problem with the way Dreamweaver CC handles them.
    However, if you feel happier working with Dreamweaver CS6, you can download it from the following page:
    https://creative.adobe.com/products/dreamweaver
    Open the drop-down menu under "In this version", and select Dreamweaver CS6 as shown in the following screenshot:
    With Dreamweaver CS6 selected, click the large Download button at the top-right of the page. You can then download CS6, and install it alongside Dreamweaver CC.

  • In Textedit, how do I copy a hyperlink url, but only copy the link location and not the link text?

    Suppose I have a list of hyperlinked internet URL's. I want to extract their Internet addresses -- the link locations --  which are essentially hidden in the link text. Is there any way to select and copy the list of hyperlinks, but only copy the link locations, and not the link text?
    For example, with the links:
    The White House
    Google
    One of my previous posts
    What I really want to copy are: "http://www.whitehouse.gov/", "http://www.google.com/", and "https://discussions.apple.com/thread/2737556".

    I figured out how to do it. First, copy the hyperlinks onto a blank RTF document in TextEdit and save the file.
    Second, open the file from within TextEdit, and make sure that the box "Ignore rich text commands" is checked in the open file dialog box. In the open document, the hyperlinks from my example in my first post will look like this:
    {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
    {\fonttbl\f0\froman\fcharset0 Times-Roman;}
    {\colortbl;\red255\green255\blue255;\red0\green7\blue232;}
    {\info
    {\author Garald P. Weller}
    {\*\copyright Garald P. Weller}}\margl1440\margr1440\vieww20000\viewh14400\viewkind0
    \deftab720
    \pard\pardeftab720\sa240\ql\qnatural
    \f0\fs24 \cf0 \
    \pard\pardeftab720\sa240\ql\qnatural
    {\field{\*\fldinst{HYPERLINK "http://www.whitehouse.gov/"}}{\fldrslt \cf2 \ul \ulc2 The White House}}\
    \pard\pardeftab720\sa240\ql\qnatural
    {\field{\*\fldinst{HYPERLINK "http://www.google.com/"}}{\fldrslt \cf2 \ul \ulc2 Google}}\
    \pard\pardeftab720\sa240\ql\qnatural
    {\field{\*\fldinst{HYPERLINK "https://discussions.apple.com/thread/2737556"}}{\fldrslt \cf2 \ul \ulc2 One of my previous posts}}\
    Third, use the Automator function, "Get URLs From Text," to create a service, which I called "Get URLs From Text," that receives text from any window, gets the URLs, and copies the result to the clipboard:
    Fourth, select the entire page above, and go to TextEdit > Services to activate the "Get URLs" service.
    Fifth, create a new TextEdit document, and paste the result.
    The output is exactly what I wanted, the URLs -- i.e., the link locations -- of the three web pages, without the link text.
    Another utility that will extract URLs is CopyPaste Pro, which has an innate ability to extract Internet addresses from either web pages or text pages.

  • Why is the Executable class only available in Script Task and not in Script Component.

    Why is the Executable class only available in Script Task and not in Script Component.
    Here is a link to the Executable class documentation.
    http://technet.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.executable.aspx
    Mr Shaw

    Because Executables are available only in Control Flow. Script Task is a control flow component whreas Script Component is a data flow component. It works on data buffer and rows and not on executables.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How can I restore my data from iCal? I didn't make any backup, but I use  time machine with an external HD. I deleted iCal when I deleted my gmail account. I have tried to restore, but I can only restore the iCal software and not the data.

    How can I restore my data from iCal? I didn't make any backup, but I use  time machine with an external HD. I deleted iCal when I deleted my gmail account. I have tried to restore, but I can only restore the iCal software and not the data.

    So what is your question?
    If you forgot your encryption password:
    Warning: Make sure it's a password you will remember or write it down for safekeeping. If you encrypt an iPhone backup in iTunes and forget your password, you can't restore from backup and your data will be unrecoverable.
    If you can't remember the password and want to start again, you must perform a full software restore and chooseset up as a new device when iTunes prompts you to select the backup from which to restore.
    The above comes from here:
    http://support.apple.com/kb/HT4946

Maybe you are looking for

  • How do I get rid of ZoneAlarm search engine in the address bar and middle-of-page search box?

    I downloaded ZoneAlarm firewall. It has you install Chrome and choose its search engine when you download. I'd heard these were easily removed afterward. I reset Google in the upper right search bar. Now Firefox starts OK, but each time I use a tab t

  • Cannot launch Monitoring & Report Viewer

    Hi everybody, i just installed ACS 5.1.0.44 with the latest Patch on a VMWare virtual machine and installed the evaluation license. Everything works fine except for the "Monitoring & Report Viewer"-Tab: When i try to launch the Viewer, it opens a new

  • Site definition dialog box

    I'm very new to Dreamweaver and am trying to bring in a website design that I did in photoshop.  Trouble is, all the tutorials I see mention the Site Definition Wizard which is supposed to be accessible through the Site Definition Dialog Box.   My un

  • Globally changing Fonts and animations in AE CS3?

    I have the need to globally change the fonts and text animation presets in an AE project that has multiple "sequences", if you will. These comps contain the text I can reuse (and not have to retype) and I was hoping I could select all the comps and c

  • Data center vs mdf?

    Hello, My question is, What is the difference between a data center and an MDF. I know the ISP line always drops into the MDF. Is that the same with a data center? If so, to me it seem like a data center is just a very large mdf that needs alot of co