How to disable the frame to be moved

On my program I use JFrame class. My problem is that I want the frame to be fixed in its place and can not be moved.
Any one can help me in this..
Thanks.

What you need to do is provide a ComponentListener which always resets the JFrame back to its original position.
imports left out...
public class FixedFrame extends JFrame{
     private Rectangle rect;
     public FixedFrame(){
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          rect = new Rectangle(200,200,200,200);
          setBounds(rect);
          setVisible(true);
          addComponentListener(new ComponentAdapter(){
               public void componentMoved(ComponentEvent ce){
                    setBounds(rect);
               public void componentResized(ComponentEvent ce){
                    setBounds(rect);
     public static void main(String[] args){
          new FixedFrame();
}

Similar Messages

  • How i disable the frame window??

    how i disable the frame window??
    i had used frame.disable(); function but its not work...
    disable function works only on components its not work on frame..

    hi!
    1) which one you are using? Frame/JFrame ?
    2) exactly what do you want to disable?
    a) entire frame including titlebar buttons
    b) just all the child components, menus, toolbar buttons
    c) what should be the behavior of taskbar at the time of disabled frame object?
    i think for a proper and to the point solution these are thing one need to know.
    regards
    Aniruddha

  • How to disable the frame rotation corner

    One thing that is bothering since the frame rotation feature was added is the missing option to DISABLE this feature!
    Perhaps it's just my way of working, if I want to rotate a frame I quickly press "R" on the keyboard, rotate and press "V" or else to get back.
    Almost every time I want to scale a frame on the logical lower right corner I hit "rotate" first and have to try again. I find that very annoying and am sure there are many others having the same issue with it. Too many functions on already hard to grab corner edges are rather counter-productive in my eyes.
    Any way to disable that rotation corner?
    If not:
    Adobe – it would be cool to have a simple option in the prefs where one can enable/disable that function.
    Thanks!

    What you need to do is provide a ComponentListener which always resets the JFrame back to its original position.
    imports left out...
    public class FixedFrame extends JFrame{
         private Rectangle rect;
         public FixedFrame(){
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              rect = new Rectangle(200,200,200,200);
              setBounds(rect);
              setVisible(true);
              addComponentListener(new ComponentAdapter(){
                   public void componentMoved(ComponentEvent ce){
                        setBounds(rect);
                   public void componentResized(ComponentEvent ce){
                        setBounds(rect);
         public static void main(String[] args){
              new FixedFrame();
    }

  • How I disable the iPad picture frame mode?

    Several times I looked in the settings but could not find this option, just in the passcode settings, but I turned off the passcode, the picture frame is turned on WHY? And how I disable the picture frame? I looked this on youtube in an iPad review video at 2:35 min: http://www.youtube.com/watch?v=Aly5Q_mUhVI
    Thanks for the help.

    Of course you can.
    If you don't want the little flower icon appearing on the unlock screen, set the Allow Picture Frame to Off under Passcode in General Settings.
    If you want to deactivate the Pcitrue Frame mode while its running, tap the home button once, and click on the Flower icon at the bottom right whihc should be blue since its on.

  • How to disable the reminding dialog when close the webi report viewer

    Dear all
    How to disable the reminding dialog when close the webi report viewer
    Background
    When user close the webi report viewer in inforview by click the button in the right-top of the webi report viewer frame. It always prompt a dialog to remind user that the modification will be lost without saving.
    But customer need to disable this dialog, and can clost the report viewer directly.
    So is there any ways to modify this?
    I think it shoule modify some .js file under tomcat, but can not find the solution.
    Thanks a lot, any information woulde be appreciated.
    David Zhang

    I've had the same issue bugging me since installing Snow, er, lion, er, cat, er, cougar, er, Mountain Lion. Incredibly ANNOYING.
    It's stupid stuff like this and reverse scrolling that really turn long-timer users off. I'm personally glad Forstall got fired for blunders such as these.
    I'm serious peeved that turning off iCloud Documents & Data actually deletes documents and data locally. That's just incredibly stupid.
    MANY thanks mende1 for the answer on how to fix it.

  • I have changed the apple ID (email, but on my iphone , the icloud is stil asking me to log in whit the old email.And it is poping-up on every 10 seconds.I never used icloud, and i dont want to use it.I just dont know how to disable the icloud.

    i have changed the apple ID (email) but on my iphone , the icloud is stil asking me to log in whit the old email.And it is poping-up on every 10 seconds.I never used icloud, and i dont want to use it.I just dont know how to disable the icloud.

    If you see that pop up you enabled icloud. Whether you want or do not want now to use it irrelevant until you actually disable activation lock.
    In order to do that you have to change your apple id back to do that just long enough to sign in and back out. System will ask you to verify, don't.
    Just sign in on the prompt you getting and then logout. Once done, change apple id to what you have now and verify. Then decide if you want to
    use icloud (who does not want to be able to track their phone if lost or stolen).

  • I have an older mac and it wants me to update to itunes 10 but my mac is too old and I cant figure out how to disable the update

    I have an older mac and it wants me to update to itunes 10 but my mac is too old and I cant figure out how to disable the update so I can use the store.

    If Software Update is offering the update then it would be compatible with your model.  Unfortunately, you haven't provided us with any information on your hardware that would enable us to determine if it really is too old.
    If you really wish to disable the update alert then the next time Software Update opens, select the update in the list then select "Ignore update" from SU's Update menu.

  • How to disable the previously entered user ID's that automatically appear. For example ; when logging into email , first letter of user ID promts the previously used email user IDs... Want to disable this feature---How can ot be done ?

    Question
    How to disable the previously entered user ID's that automatically appear. For example ; when logging into email , first letter of user ID prompts the previously used email user IDs... Want to disable this feature---How can it be done ?

    *Click the (empty) input field on the web page to open the drop down list
    *Highlight an entry in the drop down list
    *Press the Delete key (on Mac: Shift+Delete) to remove it.
    *http://kb.mozillazine.org/Deleting_autocomplete_entries
    * Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"
    * Tools > Options > Privacy > History: "Remember search and form history"
    * https://support.mozilla.com/kb/Remembering+passwords
    * https://support.mozilla.com/kb/Form+autocomplete

  • How to disable the purchase function?

    Anyone know how to disable the purchase function from the ipad2? How to disable and empty the payment credit card inform? If not, is it secure?

    None for payment
    After establishing the Credit Card account (i.e. after you have made purchases), you can remove the credit card information by editing your payment info, choosing "None".

  • How to disable the selection of "Title and logo URL of a SharePoint 2013 site" from browser

    how to disable the selection of "Title and logo URL of a SharePoint 2013 site" from browser or How can we able to set our custom default log to the sp2013 site using code.So that users are not allowed to change from browser again.
    Thanks & Regards, Krishna

    Hi  Krishna,
    For your issue, you need to deploy a farm solution using HideCustomAction to hide site settings link. For example to hide “Title, description, and logo” link you can use below code:
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <HideCustomAction
    GroupId="Customization"
    HideActionId = "ProjectSettings"
    Location = "Microsoft.SharePoint.SiteSettings">
    </HideCustomAction>
    </Elements>
    Reference:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/92f002b7-0e9c-424e-836a-de40c4e5d81f/hide-option-from-site-settings-page-in-sharepoint-2010?forum=sharepointdevelopmentprevious
    http://blog.milanchauhan.com/2013/06/add-custom-section-in-site-settings.html
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to disable the status icon in Skype 4 for Andr...

    Dear Skypers,
    How to disable the status icon in Skype 4 for Android phones?
    The guide on this following support page not working anymore: https://support.skype.com/en/faq/FA12359/how-do-i-enable-or-disable-the-status-icon-in-skype-4-for-a...
    Older version has the option to disable Skype Status and get rid of the Skype icon on Android status bar. But latest 4.4.0.31835 could not disable Skype Status in notifications settings. :/
    Device: Google Nexus 4
    Android: 4.3 JWR66Y
    Skype: 4.4.0.31835
    Please bring back the option to disable the Skype icon on Android status bar. This is the main reason I uninstall Skype. :/
    Kudos to the team, the apps is really smooth and fluid to use. Would be nice if you guys are following the Android Design Principles and using Google Cloud Messaging for push notification to improve User Experience and battery life.
    Kind regards,
    /chrone
    everytime i get ahead, i feel more dead.
    Solved!
    Go to Solution.
    Attachments:
    how to get rid of skype icon on android status bar.png ‏46 KB

    Long click on this notification a sub menu having field "App info" would appear goto App Info. You can goto there by "Manage Apps">"Skype" also. 
    Uncheck Option "Show Notifications" A dialog will open. Don't worry about notifications for now just click OK. Now the notification icon skype has also been removed. 
    Now simply check "Show notification again". After doing this you would get notifications but skype icon would not be shown in the status bar anymore.
    Issue: this is just a trick you need to repeat this every time sign out and sign in again. Mostly you don't do that so no need to worry.

  • How to disable the cancel button in InputDialogBox?

    Can someone please tell me how to disable the cancel button in an input dialog box?
    thanks,

    Cross posted: [http://www.coderanch.com/t/487888/Swing-AWT-SWT-JFace/java/disable-cancel-button-input-dialog]

  • How to disable the inputfield using radio button dynamically in module pool

    How to disable the inputfield on the screen using radio button dynamically in module pool.
    Please suggest .
            Thanks.
    Edited by: Lavanya YH1504 on Jul 30, 2010 1:20 PM

    I got it thank you.
    LOOP AT SCREEN.
        if  screen-GROUP1 = 'LA1'.
           If RADIO1 = 'X'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
         ELSEIF RADIO2 = 'X'.
           screen-input = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    Edited by: Lavanya YH1504 on Jul 30, 2010 1:51 PM

  • How to set the frame size?

    Hi,
    Can some one show me how to set the frame size in this program? History: I have created a window and added a button but its to small. So I want to increase the size of the frame to at least 600X400 pixel.
    private static void showGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("ButtonDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            Main newContentPane = new Main();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        }It would be nice if you could show me how to do it.
    Thank you very much for reading this.

    Challenger wrote:
    Simply adding
    frame.setSize(new Dimension(600,400));to the end of your code should work perfectly.Or, if you want to do it correctly, .setPreferredSize() on your frame before you .pack() it. The default layout manager for JFrame is BorderLayout, which uses the preferredSize of each component to calculate sizes during the .pack() call.

  • How to disable the edit Permission after the task approval in project server 2010.

    Hi ,
    Can this be done.
    How to disable the edit Permission after the task approval in project server 2010.
    I mean How to Disable approve/Reject Permission Once task approved in project server 2010.
    Any Help Would be more than Welcome.

    Hi Rohan,
    Just talking about the tool capabilities, preventing a task approver (status manager) to approve/reject updates once he has already approved once is not possible out-of-the-box. You grant permissions to user: if you grant a user to approve task updates then
    he has the permission to approve updates, no matter if it is the 2nd or 3rd time the task is approved or rejected.
    Then of course you could do not custom development to do that.
    I'd say that in order to help you, we would need to understand a little bit more your business need. Why do you need to achieve such a goal? We can surely propose you workaround.
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

Maybe you are looking for

  • Icloud has taken my mail ,how do i get it back to my inbox?

    i am not sure how to use icloud but for now i have lost the mail i my inbox and im sure its in icloud. how cani get my mail to show up i my inbox.Thanks for any help

  • Report on workflows created by user

    Hi there, What is the easiest way to find all workflows created by a particular user? I can't seem to find any SAP standard reports to do this - SWIA does not have selection criteria for CREATOR. I know I can run SWIA for a wide date range and then f

  • SD Billing Listing & DO Lisitng

    Dear Expert, Any standard SAP report that could list out all the billing?  User dont want VF05 because VF05 have to generate customer code by customer code. Thanks, Kiran D.

  • Reshipping the log files to logical standby

    Hi All I am getting this error in the logical standby "ORA-01291: missing logfile" . The problem I had some wrong configuration in "standby_archive_dest" parameter in the logical database but I fixed it and now I need to reship the logfiles from prim

  • Face Book Publishing

    I am not able to publish my  pictures on Face Book, after dng conversion , its not letting the face book album to publish on wall, its not letting the dng photos, the errormessage coming that "cant upload to the facebook album named cover photos plea