Disable user from moving JInternalFrame

Hi
Is there a way the disable the user from being able to move JInternalFrames, I still need the application to be able to resize and position the iframe but not the user.
I have the resizing covered just need to stop the user from mosue dragging.
Thanks
Jamie

The solution in the above post works, does any one know if it will work for all L&Fs?That is why I gave you that solution first. I think it stands a better chance of working in all L&F's. I know the other approach doesn't work in all L&F's because some L&F's already have a custom DesktopManager. Check out this posting:
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=5169651
overriding the DefaultDesktopManger methods seems to have no effect For what its worth, here is my original SSCCE to test this out. My original implementation allowed you to control movement for individual internal frames:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.plaf.basic.*;
public class InternalFrameUnMovable2 extends JFrame
     JDesktopPane desktop;
     public InternalFrameUnMovable2()
          desktop = new JDesktopPane();
          desktop.setDesktopManager( new NoDragDesktopManager() );
          getContentPane().add( desktop );
          desktop.add( createInternalFrame(1, Color.RED) );
          desktop.add( createInternalFrame(2, Color.GREEN) );
          desktop.add( createInternalFrame(3, Color.BLUE) );
     private JInternalFrame createInternalFrame(int number, Color background)
          JInternalFrame internal =
               new JInternalFrame( "Frame" + number, true, true, true, true );
          internal.setBackground( background );
          internal.setVisible( true );
          int location = 50 * number;
          internal.setBounds(location, location, 300, 300);
          return internal;
     public static void main(String args[])
          InternalFrameUnMovable2 frame = new InternalFrameUnMovable2();
          frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
          frame.setSize(600, 600);
          frame.setLocationRelativeTo( null );
          frame.setVisible(true);
          //  Activate first internal frame
          try
               JInternalFrame[] frames = frame.desktop.getAllFrames();
               frames[0].setSelected(true);
          catch (java.beans.PropertyVetoException e) {}
          //  Make first internal frame unmovable
          JInternalFrame[] frames = frame.desktop.getAllFrames();
          JInternalFrame f = frames[0];
          f.putClientProperty("dragMode", "fixed");
     class NoDragDesktopManager extends DefaultDesktopManager
          public void beginDraggingFrame(JComponent f)
               if (!"fixed".equals(f.getClientProperty("dragMode")))
                    super.beginDraggingFrame(f);
          public void dragFrame(JComponent f, int newX, int newY)
               if (!"fixed".equals(f.getClientProperty("dragMode")))
                    super.dragFrame(f, newX, newY);
          public void endDraggingFrame(JComponent f)
               if (!"fixed".equals(f.getClientProperty("dragMode")))
                    super.endDraggingFrame(f);
}If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)", that demonstrates the incorrect behaviour.
http://homepage1.nifty.com/algafield/sscce.html

Similar Messages

  • I want to see list of Disabled user from AD and LDAP

    Hi
    i wan see the list of disabled user from AD and LDAP and it shows in the next page as Tabular format
    having all the details of AD (Attributes)

    Hi
    i wan see the list of disabled user from AD and LDAP and it shows in the next page as Tabular format
    having all the details of AD (Attributes)

  • How to stop user from moving position of a column in a JTable

    hello,
    can anyone tell me how to disallow the user from moving the column or a row in a JTable.

    setReorderingAllowed() of JTableHeader

  • How to disable user from accessing form settings?

    Hi,
    What is the authorization to disable a user from acessing the forms settings of the main menu?

    General Authorization, User name --> General --> Document Settings --> set to no authorization.
    now the user can click n see the form setting, but cant change any prior settings.
    Regards,
    Dhana.

  • Disable users from adding-deleting row/columns

    we are running sharepoint 2010 and I would like to setup some type of persmission that will disable certain users from adding-deleting  rows/columns.
    any suggestions will be appreciated
    thank you

    Each list in sharepoint can be assigned certain roles.YOu can break the inheritance for that list and assign a group as a new role to the list.The users belonging to that group will only have access to that list depending to what permissions you give that
    group.The code goes something like this:
    SPWeb web = (SPWeb)properties.Feature.Parent;
    string ListName = "C";
    SPList list = web.Lists[ListName];           
                list.BreakRoleInheritance(true);           
    string GroupName = "Owners";
    SPGroup group = web.SiteGroups[GroupName];
    SPGroupCollection removeGroups = web.SiteGroups;
    foreach (SPGroup removeGroup
    in removeGroups)
    if(removeGroup.Name != GroupName)
    SPPrincipal principal = (SPPrincipal)removeGroup;               
                        list.RoleAssignments.Remove(principal);
    SPRoleDefinition rDefination = web.RoleDefinitions.GetByType(SPRoleType.Administrator);
    SPRoleAssignment rAssignment =
    new SPRoleAssignment(group);
                rAssignment.RoleDefinitionBindings.Add(rDefination);
                list.RoleAssignments.Add(rAssignment);
                list.Update();

  • Disabling user from resizing window?

    Hello. How do I stop users from being able to resize the window?
    Also, how can I set the default size of my window?
    Heres a sample...
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class gui extends JFrame
         public gui()
              super("GUI");
         public static void main(String[] args)
         JFrame frame = new gui();
         WindowListener l = new WindowAdapter() {
              public void windowClosing(WindowEvent e) {
                   System.exit(0);
         frame.addWindowListener(l);
         frame.pack();
         frame.setVisible(true);

    Sorry, I told you the wrong thing there (I didn't look up the API docs before I posted, so I guess I did the same thing as you ;)
    You can call setSize(...) for sure. The methods that I cited (setPreferred, setMinimum, and setMaximum) don't exist (but their 'get' counterparts do, so that's why I got confused).
    In any case, you can use 'getSize(...)'. This doesn't exist in the Frame class itself, but in the Component class. If I am looking for a method sometimes I do a Ctrl-F search in IE to look for a method name, because sometimes ut's hidden away in the super-class(es) method list.
    Hope that helps.
    Ben

  • HT4790 disable users from unlocking bootdisk

    Hi,
    Recently I have upgraded to Mountain Lion. I have enabled FileVault 2 succesfully.
    When I now create a new login account, this account is automatically able to unlock the disk at boot time with his/her own username/password. Is there a way to disable this useraccount from unlocking the bootdisk ?
    I only want this useraccount to be able to use the computer after I have turned on the power and unlock the disk, and then logout of my account.
    Thanks,

    Umm dont give admin rights to the new user account.
    Or you might want to look in to an advanced topic of modifying the  etc\authorization file to block access to the file encryption control panel.
    Reference Apple support, but in place of datetime look for filevault and then unlock/lock what you dont want unlocked/locked down for standard users.
    http://support.apple.com/kb/TA23576
    Additional this is where I read and applied this technique to our enterprise macs:
    http://mattsmacblog.wordpress.com/

  • How to disable user from adding personal devices to EAS?

    I have enabled the EAS mobile device policy for a user (John) with a specific policy named "Samsung S4".  It works perfect, he connects as designed.
    The issue is he has taken it upon himself to add additional devices (personal iPhone & iPad) with the settings that are in his Samsung S4. 
    How can I disable other devices and only allow him to connect one device the "Samsung S4"?
    Exchange 2013 sp1
    PennyM

    Martina,
    I ran that as of now.  Is this something I could have done in the EAC?
    Yesterday, I was in EAC opened up his mailbox, went into the Mobile Device Details and selected "Access Denied" for the iPhone/iPad and selected "Allow" for the Samsung S4.  But, when I checked this morning the following was shown;
    Samsung S4 - Access granted
    iPhone - Remote Device Wipe Successful (I think his supervisor initiated this)
    iPad - Access Denied
    Do I need to do anything else to clean this up correctly?
    PennyM

  • How do I prevent users from moving subfolders on shared folders?

    I have a Snow Leopard Server sharing several folders via AFP. For now, all users have full access on everything, since we have no confidentiality issues. Unfortunately, from time to time some users inadvertently move folders around (mostly drag and drop accidents).
    So, how should I set permissions so that my users can read and write data within a folder, but can not move or delete the parent folder itself?
    To clarify, the structure (from the user's point of view) would be:
    \Volume\Shared_Docs\AAA
    \Volume\Shared_Docs\BBB
    \Volume\Other_Stuff\CCC
    \Volume\Other_Stuff\DDD
    I would like users to have full access and rights on the content of AAA,BBB,CCC and DDD, but I do not want them to be able to move, say, AAA to Other_Stuff, or to delete it.
    Thanks
    Christian

    You can also put the icons on the Dock, then turn on Parental Controls for his user account so that he can't accidentally change it.
    First go to his account and set up the Dock with the apps, folders, or documents that he will use. Then in SystemPreferences>Accounts>ParentalControls>Finder&System uncheck 'Modify the Dock' as one of the things he can do.
    To make it easier, you might then want to make the Dock larger and turn on Magnification in the Dock prefpane.

  • Need to disable users from using nquser and nqpassword in the url with SSO

    Is this possible in OBIEE or do I need to creat a mod_rewrite rule to remove nquser= & nqpassword?

    suggestion or two in here :
    http://kr.forums.oracle.com/forums/thread.jspa?threadID=295697&messageID=3128576
    I always thought there is tag that goes in either instanceconfig.xml or another config somewhere (SSO?) to disable this, cant seem to find the reference to it anywhere.

  • How do i disable a user from editing history

    i want to be able to (as administrator on workstations in my small business) disable users from editing history in firefox. this is vital in a business environment. if there is a solution for this please advise. i have windows xp and 7 machines that run firefox as default browser. any help is appreciated.

    Hmm.  I am going to speculate looking into pwpolicy (man pwpolicy).  You can get a users policy by using:
    sudo pwpolicy -u username -getpolicy
    (replace username with an actual user's shortname)  However, I will admit that I've not attempted to set policy on an individual in a long time.  I do know that in 10.9 any attempts to mess with individual policy bricks the account until you remove the settings.  In 10.8 I have not tried.  10.6 is probably the last time I've explored this (but back then there was a UI for it).
    I would suggest a test account or even an entire test server.  You are clearly going off the reservation with this attempt.
    R-
    Apple Consultants Network
    Apple Professional Services
    Author "Mavericks Server – Foundation Services" :: Exclusively available in Apple's iBooks Store

  • Is there a way to prevent a user from using the graph cursor legend to delete a cursor?

    I would like to have 2 cursors on a graph that can't be deleted by the user.

    Hi Dennis,
    I'm having this problem as well, and found your post. Are you referring to the Enabled State of the entire graph?  If so, this prevents the user from moving the cursor at all while the VI is running, which, of course, defeats the purpose of having a cursor at all.  Ideally, I would like to show the cursor palette and disable it's run-time shortcut menu.  This doesn't appear to be possible.   One workaround would be to hide the palle and instead include some indicators that show the cursors' values.  I'd prefer to show the palette to keep the program simpler.
    Any other solutions?
    Thanks,
    Alan
    Alan Blankman, Technical Product Marketing Manager and LabVIEW Developer
    LeCroy Corporation
    800-553-2769 x 4412
    http://www.lecroy.com
    [email protected]

  • Outlook Contact Card - Organization Tab disabled users

    In Outlook there is a Contact Card showing detailed information about that person. the Organization tab shows the contact's "Manager", "Shares Same Manager" (other contacts with the same manager), and "Direct Reports" (people
    that report to that contact).
    The problem i am seeing is that Users disabled in Active Directory (people that have left the company) are showing up in the Organization Tab.
    How can i filter out disabled users from this list for anyone using Outlook?
    I cannot permanently delete users from Active Directory until after a disabled account reaches a certain age. Also i would prefer not modifying the disabled Active Directory user accounts.
    We mostly run Outlook 2010 with a few people running Outlook 2013

    Hi,
    Outlook has no control over this, it just displays what it got from the server end. And to my knowledge, there is no such a feature to filter out those users from that list, at least on Outlook client.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Remove GrantSendOnBehalfTo disabled user accounts - A novice at scripting

    Hello.  Can anyone help please
    In our exchange 2010 environment we have users who are granted send on behalf to access.  Obviously some users leave and I m finding that there are ghosts left behind which are causing issues with our team who add users into the grantsendonbehalfto
    option using the EMC.  Using the log view we coy out the command and then remove the disabled user from the command and then paste this into an Exchange Powershell command line.  This wrks because it is doing what Exchange EMC does which is rewrites
    the -GrantSendOnBehalfTo option in it new entirety.  
    The problem occurs because I need to remove these en-mass from approx 700 plus accounts.  
    I have tried to modify one user in order to get the script to work but it doesn't.
    This is the error message that happens when I run the script below against a known account with at least 2 disabled users in:-
    Couldn't find object "xxxxxxxx.xx.xxxxxxx.xxx.xx/DisabledUsers/2013-08/Gaynor Collins-Punter". Please make sure that i
     was spelled correctly or specify a different object. Reason: The recipient xxxxxxxx.xx.xxxxxxx.xxx.xx/DisabledUsers/2
    13-08/Gaynor Collins-Punter isn't the expected type.
        + CategoryInfo          : NotSpecified: (:) [], ManagementObjectNotFoundException
        + FullyQualifiedErrorId : F6498844
        + PSComputerName        : ex02-0029.xx.xxxxxxx.xxx.xx
    Am running the script from my local PC
    This is the script I have used.
    # Gather info use get-mailbox -resultsize unlimited$mailboxes = Get-Mailbox zplew1
    Foreach($mailbox in $mailboxes)
    for($i = ($mailbox.GrantSendOnBehalfTo.count)-1; $i -ge 0; $i--)
    $address=$mailbox.GrantSendOnBehalfTo[$i]
    $addressString=$address.addressString
    If($addressString -like "*disabled*")
    $mailbox.GrantSendOnBehalfTo.removeat($i)
    $info >> "C:\Scripts\grantsendonbehalfto.csv"
    $mailbox |set-mailbox -GrantSendOnBehalfTo $mailbox.grantsendonbehalfto
    }If you requiere any more info please let me know.

    #1 - I recommend posting in xchange forum fo rhow to do this
    #2 - Wen an account is disabled most on the information in the object is hidden.  YOu would need to undelete to use the object.
    #3 - Get list as text and validaye al values are not deleted accounts.  Remove deleted and save back.
    ¯\_(ツ)_/¯

  • Disable user in OIM

    Hi *
    when i disable a user, it should not disable the user access to particular resource in which he is already provisioned.
    this req. looks pretty simple. but i could not find how to implement this functionality in design console.
    pls help me in this regard.
    thanks in advance.

    @OIM Learner.
    If i update AD User ---> Disable User to 'No Effect'
    Than while trying to disable user from Admin console it gives error:
    User Detail >> Resource Profile >> Ad User -> Dsiable
    Thor.API.Exceptions.tcAPIException: Resource is not configured properly.
    Class/Method: ResourceProfileProvisioningTasksAction/dispatchConfirmation encounter some problems: Cannot Disable
    Later i revert back to AD User ---> Disable User to 'Disable Process or Access To Application'
    Admin Console:
    User Detail >> Resource Profile >> Ad User -> Dsiable
    It disables user from AD.
    Is there a way to stop Automatic trigger on OIM User disable. As for our environment user might need to have access to resources even after it being Disable from OIM.
    Thanks a lot.

Maybe you are looking for

  • How can I save a clip for later use?

    When I am editing a project and going through my footage I often find a short clip that I'd like to use maybe later in the timeline or possibly to use in a different project. How can I do that? This may be obvious but I want to rename and save that c

  • ARCH error

    hai i am getting this follwing error in alert log file ARC0: Evaluating archive log 6 thread 1 sequence 10326 ARC0: Unable to archive log 6 thread 1 sequence 10326 Log actively being archived by another process Mon Mar 31 10:09:27 2008 ARC1: Beginnin

  • Includes from list, Dynamic list/form and Apache mod_rewrite

    Hi, I have: index.php (with includes from list) activity.php (a dynamic list as included page) activity_edit.php (a dynamic form as included page) I want to use SEO friendly url. But links from my "List" pointing my "Form" (edit, add new) don't work

  • Ichat not responding

    When initiating or receiving an ICHAT AV, my error mess says, Failed to start video chat because I did not respond. But I have reponded. emac   Mac OS X (10.4.7)   ichat 3.1.5

  • Where do I find the workstation management agent?

    I used to install this through the old client, but now it appears it is no longer included in the client. Where can I find an installer for this so I can add it to workstations that have the newest client? Thanks!