Dragging the frame within restricted area

hi,
I have an application. when i press on a button, a dialog appears. I want to restrict the dragging area of the dialog within certain area.
The dialog should not be dragged outside that area.
Is there a way to do it?
Is it possible to remove the X button from the dialog?
Help needed urgently.
Thanks in advance,
regards,
Deepa Raghuraman

The dialog should not be dragged outside that area.
Is there a way to do it?just overwrite the setLocation() method and check the x/y coordinates. if the fall within the allowed area call super.setLocation() else just return...
thomas

Similar Messages

  • The "always allow" button is grayed out in settings regarding cookies, and I can not find where to change the setting.  (Restrictions are not on.)

    The "always allow" button is grayed out in settings regarding cookies, and I can not find where to change the setting.  (Restrictions are not on.)  Do you know where I go to change the setting to allow me to "always allow" cookies?

    Hi lisaarnett111,
    If you are having issues turning on Always Allow for cookies in Safari on your iPad, you may want to check to make sure that you don't have Private Browsing enabled, as noted in the following article:
    Turn Private Browsing on or off on your iPhone, iPad, or iPod touch - Apple Support
    Regards,
    - Brenden

  • How to add a scroll bar within a view window ?I want to display x and y axis outside the scoll window and keep those axis static and move the graph within scroll area

    how to add a scroll bar within a view window ?I want to display x and y axis outside the scoll window and keep those axis static and move the graph within scroll area
    ananya

    Hey Ananya,
    I believe what you want to do is possible, but it will not be
    easy.  If you want to add a scroll bar that will scroll the graph
    back and forth but keep the axis set, you would want to add a
    horizontal or vertical scrollbar.  Then you would create an event
    handler for the scroll event.  You would have to manually plot
    different data within this scroll event.  Unfortunately, there is
    not really a built in way to do this with the Measurement Studio plot
    control.
    Thanks,
    Pat P.
    Software Engineer
    National Instruments

  • I have purchased an app, Jelly Defense, from the app store.  It says downloaded on the computer but does not show up at all on the iPod.  Restrictions are on and ready to receive.  The Wi Fi says it's on too

    The Wi Fi is on, but the app doesn't even show up onthe device.  On my computer in purchased, it shows it's downloaded.  Now what?

    The requirements for that app state that you need a 3rd-generation or 4th-generation iPod touch, with iOS 4.2 or later. Is what what you have?

  • Stop the Frame from being able to be dragged

    Hi all
    I was hoping that someone could tell me how to stop the frame from being dragged
    while a dialog is showing.
    I am using this code to call the dialog.
    When is is visible I can still click and drag the frame behind it.
    I want to set it so you can not drag it until the dialog has be closed.
        public void runStartup() {
            Login dlg = new Login(this, "Login", true);
            Dimension dlgSize = dlg.getPreferredSize();
            Dimension frmSize = getSize();
            Point loc = getLocation();
            dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x,
                            (loc.y + 22));
            dlg.setModal(true);
            dlg.pack();
            dlg.show();
        }

    here is the Login Class
    package build0_0_1.dialogs;
    import java.awt.BorderLayout;
    import java.awt.Frame;
    import javax.swing.JDialog;
    import javax.swing.JPanel;
    import java.awt.*;
    import com.borland.jbcl.layout.XYLayout;
    import com.borland.jbcl.layout.*;
    import javax.swing.JLabel;
    import javax.swing.JComboBox;
    import javax.swing.JPasswordField;
    import javax.swing.JButton;
    import javax.swing.ImageIcon;
    import build0_0_1.images.image_pics;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseAdapter;
    import java.awt.event.FocusEvent;
    import java.awt.event.FocusAdapter;
    import build0_0_1.mysql.MYSQLDAO;
    import build0_0_1.Command;
    import javax.swing.*;
    import java.sql.SQLException;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2005</p>
    * <p>Company: </p>
    * @author not attributable
    * @version 1.0
    public class Login extends JDialog {
        ImageIcon back;
        MYSQLDAO mysqlDAO;
        Command command;
        JPanel panel1 = new JPanel();
        XYLayout xYLayout1 = new XYLayout();
        JLabel loginLabel = new JLabel();
        JLabel nameLabel = new JLabel();
        JLabel passwordLabel = new JLabel();
        JComboBox jComboBox1 = new JComboBox();
        JPasswordField passwordField = new JPasswordField();
        JButton loginButton = new JButton();
        JButton cancelButton = new JButton();
        JLabel backLabel = new JLabel();
        JLabel logoLabel = new JLabel();
        JComboBox locationComboBox = new JComboBox();
        JLabel locationLabel = new JLabel();
        public Login(Frame frame, String string, boolean _boolean) {
            super(frame, string, _boolean);
            try {
                setDefaultCloseOperation(DISPOSE_ON_CLOSE);
                jbInit();
                pack();
            } catch (Exception exception) {
                exception.printStackTrace();
        public Login() {
            this(new Frame(), "Login", false);
        private void jbInit() throws Exception {
            this.setResizable(false);
            this.setUndecorated(true);
            this.setSize(new Dimension(450, 220));
            back = new ImageIcon(image_pics.LOGIN_BACK);
            logoLabel.setIcon(new ImageIcon(image_pics.SMALL_LOGO));
            panel1.setLayout(xYLayout1);
            panel1.setMinimumSize(new Dimension(450, 220));
            panel1.setPreferredSize(new Dimension(450, 220));
            loginLabel.setText("Login");
            nameLabel.setFont(new java.awt.Font("Lucida Grande", Font.PLAIN, 11));
            nameLabel.setText("User Name");
            passwordLabel.setFont(new java.awt.Font("Lucida Grande", Font.PLAIN, 11));
            passwordLabel.setText("Password");
            backLabel.setIcon(back);
            passwordField.setFont(new java.awt.Font("Lucida Grande", Font.PLAIN, 11));
            passwordField.setText("Enter Password");
            passwordField.addFocusListener(new
                                           Login_passwordField_focusAdapter(this));
            loginButton.setBackground(new Color(231, 231, 231));
            loginButton.setFont(new java.awt.Font("Lucida Grande", Font.PLAIN, 11));
            loginButton.setText("Login");
            loginButton.addActionListener(new Login_loginButton_actionAdapter(this));
            cancelButton.setBackground(new Color(231, 231, 231));
            cancelButton.setFont(new java.awt.Font("Lucida Grande", Font.PLAIN, 11));
            cancelButton.setActionCommand("cancelButton");
            cancelButton.setSelected(true);
            cancelButton.setText("Cancel");
            cancelButton.addActionListener(new Login_cancelButton_actionAdapter(this));
            jComboBox1.setFont(new java.awt.Font("Lucida Grande", Font.PLAIN, 11));
            jComboBox1.setEditable(true);
            logoLabel.setBorder(null);
            logoLabel.setHorizontalAlignment(SwingConstants.CENTER);
            logoLabel.setHorizontalTextPosition(SwingConstants.CENTER);
            logoLabel.setText("");
            locationLabel.setFont(new java.awt.Font("Lucida Grande", Font.PLAIN, 11));
            locationLabel.setText("Location");
            locationComboBox.setFont(new java.awt.Font("Lucida Grande", Font.PLAIN,
                    11));
            panel1.add(cancelButton, new XYConstraints(337, 170, -1, -1));
            panel1.add(loginButton, new XYConstraints(245, 170, -1, -1));
            panel1.add(loginLabel, new XYConstraints(208, 21, -1, -1));
            panel1.add(logoLabel, new XYConstraints(21, 20, 57, 54));
            panel1.add(passwordLabel, new XYConstraints(99, 141, -1, -1));
            panel1.add(locationLabel, new XYConstraints(104, 72, -1, -1));
            panel1.add(nameLabel, new XYConstraints(90, 106, -1, -1));
            panel1.add(passwordField, new XYConstraints(185, 138, 219, -1));
            panel1.add(jComboBox1, new XYConstraints(183, 103, 219, -1));
            panel1.add(locationComboBox, new XYConstraints(183, 67, 219, -1));
            panel1.add(backLabel, new XYConstraints(0, 0, 451, 223));
            getContentPane().add(panel1);
            panel1.grabFocus();
         * Exit action performed.
         * @param actionEvent ActionEvent
        public void cancelButton_actionPerformed(ActionEvent actionEvent) {
            System.exit(0);
         * Login to MySQL Server. Using User ame and Password
         * This pass into MYSQLDAO user Name and Password
         * @param actionEvent ActionEvent
        //This pass into MYSQLDAO user Name and Password
        public void loginButton_actionPerformed(ActionEvent actionEvent) {
            String pass = new String(passwordField.getPassword());
            if (!pass.equals("Enter Password")) {
                System.out.println("This the username   " +
                                   (String) jComboBox1.getSelectedItem() + "\n" +
                                   "Password is     " + pass);
                try {
                    mysqlDAO = new MYSQLDAO();
                    mysqlDAO.setUserName((String) jComboBox1.getSelectedItem().
                                         toString().
                                         trim());
                    mysqlDAO.setPassword(new String(passwordField.getPassword()));
                } catch (SQLException ex) {
                    // handle the error
                    System.out.println("SQLException: " + ex.getMessage());
                    System.out.println("SQLState: " + ex.getSQLState());
                    System.out.println("VendorError: " + ex.getErrorCode());
                } catch (Exception ex) {
                    // handle the error
                    System.out.println("Erro no registro do Driver Mysql!!!!");
                hide();
         * Password field select all.
         * Feild is select. The user can just start typing
         * and overright the password feild
         * @param focusGained FocusEvent
        public void passwordField_focusGained(FocusEvent focusEvent) {
            passwordField.selectAll();
    class Login_loginButton_actionAdapter implements ActionListener {
        private Login adaptee;
        Login_loginButton_actionAdapter(Login adaptee) {
            this.adaptee = adaptee;
        public void actionPerformed(ActionEvent actionEvent) {
            adaptee.loginButton_actionPerformed(actionEvent);
    class Login_passwordField_focusAdapter extends FocusAdapter {
        private Login adaptee;
        Login_passwordField_focusAdapter(Login adaptee) {
            this.adaptee = adaptee;
        public void focusGained(FocusEvent focusEvent) {
            adaptee.passwordField_focusGained(focusEvent);
    class Login_cancelButton_actionAdapter implements ActionListener {
        private Login adaptee;
        Login_cancelButton_actionAdapter(Login adaptee) {
            this.adaptee = adaptee;
        public void actionPerformed(ActionEvent actionEvent) {
            adaptee.cancelButton_actionPerformed(actionEvent);
    }

  • Folders are in the cloud, but some files within folders are missing

    Hi there
    I have just switched from using dropbox to Creative Cloud to store files. When I upload a bunch of stuff, the folders load up, but the files within them are sometimes not loading. They are visible on the machine where I originally put them on, but not visible on my other machine or on the website. It says all files are synced?
    Richard

    Hi All,
    The exact same thing is happening to me. The drop down only shows 5 of my bookmark folders. Unless I hit "Choose" then they all show but I don't want to take the extra steps. I have 9 different folders and I want to be able to just bookmark a website and drop it into that folder. I end up forgetting which folders I have b/c I only see 5 of the 9. Yes I can see them all when I hit choose but that defeats the purpose of having the bookmark function be a quick & simple one. If I have to "Organize" the folders every single time I favorite a site then its pointless to even show 5 of the folders you might as well not show any. Furthermore I can't even choose the 5 folders I want to show (i.e. the ones I use the most). I would be happy if I could opt to have my top 5 folders in the drop down menu & then the ones I don't use as much be under choose. But there is no option (that I can find) that lets you do that. I've even deleted, renamed, repositioned the folders and nothing is working.
    Btw this only happens when I 1st bookmark a new page. Under Bookmarks I can see all of my folders & links (no problem). This only happens when I am 1st bookmarking a link & want to drop it into a folder I've created.
    Please let me know if there is a way to fix this or is this a system issues.
    Thank you,
    Melina

  • Frames within a template setup

    I was asked to make a table heading remain stationary while
    viewers scroll down the page to view the lengthy table. Is there a
    way to do this? I know it can be done with frames, however my site
    is built with a template, so I would have to put the frames within
    the editable region and I can't figure out how to do that. Is there
    a way to do this with or without frames?
    You can view the page here:
    http://www.stoppemanagement.com/8-9ocr.htm
    Thanks,
    Sandy

    Please only those about position:fixed....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "josie1one" <[email protected]> wrote in message
    news:fnsqrs$8pc$[email protected]..
    > OK I'll keep my thoughts to myself (o;
    >
    > --
    > Jo
    >
    >
    > "Murray *ACE*" <[email protected]>
    wrote in message
    > news:fnsohp$65f$[email protected]..
    >> Boooo.
    >>
    >> --
    >> Murray --- ICQ 71997575
    >> Adobe Community Expert
    >> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >> ==================
    >>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >> ==================
    >>
    >>
    >> "josie1one" <[email protected]> wrote
    in message
    >> news:fnsmmk$45t$[email protected]..
    >>> Just thinking aloud... what about background:
    fixed? Possible?
    >>>
    >>> --
    >>> Jo
    >>>
    >>>
    >>> "Alan" <[email protected]>
    wrote in message
    >>>
    news:C3C68B80.2EA093%[email protected]..
    >>>> you could do it with a persistent layer.
    >>>>
    >>>> here's a code sample that came up in a
    google search.
    >>>>
    http://www.jtricks.com/javascript/navigation/
    >>>>
    >>>> but it's a lot of code, and some people
    won't enjoy having their screen
    >>>> size
    >>>> effectively reduced but the static element.
    It may also appear jerky in
    >>>> some
    >>>> browsers.
    >>>>
    >>>> --
    >>>> Alan
    >>>> Adobe Community Expert, dreamweaver
    >>>>
    >>>>
    http://www.adobe.com/communities/experts/
    >>>>
    >>>>
    >>>>
    >>>
    >>>
    >>
    >
    >

  • Restricting Drag Within An Area

    I would like place an small image within an area (canvas?)
    and restrict dragging to within that area.
    It is a user control to allow them to visually position an
    image on the display at an exact location.
    Then I would save the x and y position of where they dragged
    the item to
    I have been searching the forums for drag, but most of the
    posts are in reference to the data grid.
    Can any give me any tips or close examples that I might be
    able to search for?
    Thanks
    Mathias

    Hi Mathias,
    From what I understand,
    - Allow dragging in a Canvas and
    - If the user drags an image in that Canvas,
    - Another image cannot be dragged to the same place where
    the previous image exists and so on...
    If my above understanding is correct and assuming that you
    know how to allow dragging in a component:
    In the drag handlers of 'DragEvent.DRAG_ENTER' and
    'DragEvent.DRAG_OVER', you should check if the position of the drag
    overlaps with previously inserted image and if so call
    'DragManager.acceptDragDrop(null);' else use 'acceptDragDrop'
    Hope this helps.
    ~Chakree.

  • Text wrap for a paragraph: How to define the width of a Text box /  active text area? I simply need a longish text to wrap within the frame!

    Hello, I've been searching for a good while in the forums now, but have found no solution or real mention of the problem – I hope some of you can help.
    I want to very simply layout a text between scenes, a slightly longer text that wraps within the frame margins. Here's an example of how I want it to look:
    Now, I couldn't for the life of me get the Custom Text to behave like that, as there are no parameters to set for the width of the text area. The Text Size, yes, along with the Tracking, Baseline and all that, but the width of the text box, no. The above was created by customizing one of the other Text Generator presets that happened to be left aligned.
    However, this preset has a fade in/fade out transition, which I do not want. There's no way to remove this transition as it seems integrated into the Text Generator (meaning they are not really presets, but separate kinds of Text objects? Very silly.)
    So I am asking you: Is there any way to get the Custom Text generator to behave like that? Just a text paragraph as above. Below you'll see all I can manage with the diffferent Custom Text parameters. Any kind of repositioning and resizing of the text just changes the position and size of the frame – but the actual text items are just cropped off where they extend out of that frame. Apparently the bounding box for the text is just some default length, and I can't find any way to adjust the width. See below my different attempts.
    The same text pasted into a Custom Text generator clearly extends outside the frame:
    Here Transform just moves – or resizes – the video frame that the Text Box exists inside:
    The Crop gives similar results, and of course Distort doesn't get me closer to what I need, either. There should be simply a Text Box Width parameter to set somewhere, but if it exists they have hidden it very well. How do you do it?
    Thanks for any help, this is a silly problem, but one of now many trivial problems that amount to me growing quite dissatisfied with FCPX. Hopefully I've just overlooked something.
    All the best,
    Thomas

    Thomas...same kind of crap here.
    I used Custom Text - entered a sentence, hit return, entered another.
    Set to 72 pt.
    The default alignment is centred - I want left aligned text...the text start point stays at the centre of frame and the sentence runs off the edge of the bounding box.
    There is no settings in the Text or Title inspector dialog to correct that!
    Using Transform will not sort it!

  • Help! When i click and drag, only the frame moves!

    So when i drag a pictue in a frame, whether its eps, png watever, only the frame outline drags with my mouse, the content stays where it started, then when i relese click in a new place the content moves to it.
    I think this is some sort of fast mode or something but i cant figure out how to turn it off?
    If i click and hold for a couple seconds then when i drag the picture drags with my mouse, but its so annoying having to hover on the picture every time i want to move something.
    It also happens with transforming the picture, scalling it or rotationg it etc. I just get a preview of where it will end up from the frame outline then when i release the picture goes there.
    Im on CS6.
    If someone could help would be amazing, i've searched the web and im stumped!

    You are looking for Live Screen Redraw, and reseetting the prefs won't do a thing becasue it's set to dealyed by default in CS6. You can set it to Always in the prefs, or you can click and hold for a moment before dragging to get the live view.

  • How do I remove or delete files within a document folder? I have tried dragging the files to the trash and it does not work

    How do I remove or delete files and image files within a document foler?  I have tried dragging the files to the trash, but that is not working. 

    Right-click (or ctrl-click) on a file. If the "move to Trash" option is greyed out, select "get info" and read the permissions at the bottom of the info window.
    Wat are they?
    Do the same for the enclosing folder - what permissions does that have?

  • Editing timelapses in Lightroom- looks very different if there´s a small change within the frame

    Hi
    We´re having some serious issues with editing timelapses in Lightroom (5.6). What seems to happen over and over again, is that if there´s a small change within the frame (such as a bird flying past, people walking), the editing result varies greatly compared to the previoius frame. It´s easiest to understand what I mean by viewing the examples below.
    Here there´s one picture without a boat in the frame, and a few seconds later there´s a boat in a small part of the frame. The camera is set to full manual, and the two JPGs which show the unedited pictures shows that the background and sky in both pictures look exactly the same. However, after pasting the same editing setting on both pictures, the picture with the boat looks vastly different (shadow areas are much darker). It´s the same result weather it is a white boat, a black bird or a person walking in/out of the frame. The picture gets much darker, and leads to some serious flicker in the timelapse which can be impossible to get rid of.
    I assume that as there´s a small change in the histogram when the boat enters the frame, this change affects what Lightroom thinks of as shadows/highlights on so on? The example below has some heavy editing applied (shadows up, highlights down, clarity). You can see the settings that have been adjusted in the screenshots below. Does LR change what it considers shadows/highlights based on the histogram, or are there standard settings? If this is the case, it would be much better for timelapsers if Lightroom had standard values for what is considered shadows/highlights, so that two pictures where the only difference is a person walking on the street or not, would look the same with the same editing settings applied. What I find strange if LR works like I´m asking here, why does the picture get darker whether it is a white boat or a black bird changing the histogram slightly. Shouldn´t they then have the opposite effect of each other?
    Any ideas what is causing the difference, and what I can do about it? Thanks!

    In these forums you are only talking to other users like yourself, not Apple. Be sure to repost your info in the channel Apple has set up for it:
    http://www.apple.com/feedback/imovie_iOS.html

  • How can I Copy/paste the pixels within a frame in a video layer to another frame? (It duplicates the whole frame instead.)

    I'm making a handdrawn animation in the timeline using video layers, so each video layer contains the frames for the animation. The method works great..except for this -
    If lasso select a section of one frame and try to paste into another frame, it duplicates the the whole frame and pastes it with an arbitrary long frame duration for some reason (not the same duration as the frame its copied from)....not at all what I'm trying to do. Any work around? I've tried all the variations of 'paste special' to no avail.
    Thanks.

    Images and other object can either be floating or be inline. Yours are floating and will not move with the text. Inline object will move with the text but can't be outside the text layer. It doesn't help if you have created section in the document. Floating images doesn't care. Nor will it help if you create several documents that you want to merge later. Doesn't make any difference.
    My suggestion is that until your text is finished you have the images inline. Then as a last editing you can start make the images floating and move them a little.

  • I created a slideshow but all the photos are now mixed up. i just dragged the event to a new slideshow. how can i get them into the same order they were imported in?

    my slides are all mixed up after i imported them into a new slideshow. i just copied them from the events and dragged the icon to the new slideshow but the have re arranged themselves into a random order. I want them to play in the order i took them and copied them . How can i do this please. am working with iOS 7 on my iMac using iPhoto latest version.

    Processor  2,8 GHz Intel Core i54, GB 1333 MHz DDR3,ATI Radeon HD 5750 1024 MB,OSX 10.9.5 (13F34), im using iphoto version 9.5.1. which has been updated.. im using iOS  mavericks iMac
    Model Name: iMac
      Model Identifier: iMac11,3
      Processor Name: Intel Core
      Processor Speed: 2,8 GHz
      Number of Processors: 1
      Total Number of Cores: 4
      L2 Cache (per Core): 256 KB
      L3 Cache: 8 MB
      Memory: 4 GB
      Processor In

  • How do I create a photo in jpg or other photo format from a frame within iMovie11.  The suggestion I have found from earlier versions of iMovie does not create a jpg file that can be revealed in Finder. Help please.

    How do I create a photo in jpg or other photo format from a frame in iMovie. The previous suggestions on here do not create a jpg file when you chose reveal in finder when using iMovie11 and OS X

    First, get an app called MPEG Streamclip, which is free. (google MPEG Streamclip from Squared 5)
    Open MPEG Streamclip.
    In iMovie, select the clip you need. Then, right-click/Reveal in Finder.
    Drag this clip into MPEG Streamclip
    In MPEG Streamclip, move the playhead to the frame you want.
    In MPEG Streamclip, click FILE/EXPORT FRAME.
    Choose JPEG, TIFF, or PNG and give it a name.
    You can then drag this photo into iPhoto.
    Here is a video I made that steps through this...
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

Maybe you are looking for

  • Document number in company code and fiscal year has already been

    Hello, While doing a PGI of a delivery in VL02N transaction, I am receiving a dump with the above message in the subject. Short text of error message: Document number 6200 4900000020 2010 was already assigned Long text of error message: Diagnosis    

  • ABAP Report WRITE, how to ouptut long lines without additional formatting?

    I am developing a program, which dumps objects as XML and I need to create one big XML file at the end. I would like to start it as a background job and get this XML as spooled output at the end. The problem is that the XMLs come from CALL TRANSFORMA

  • Custom View in Designers Rollup Header from Lookup Field

    Hi! I have a task list that is rolling up a couple of different ways. I'm having some issues getting it to be just right. 1) Rollup display. The rollup is working great except:  My task list is using a lookup field on an list of initiatives. The look

  • Can't adjust Bass and Treble from windows Mixer (SB Audi

    Hello,?i have Sound Blaster Audigy (5.)i installed drivers for it, but i cannot adjust Bass and Treble from ordinary W?ndows Sound Mixer, because sliders are passi've (disabled)?what is the solution?tahnk you. my system is:windows xp prof. edition +

  • Moving from Windows to Mac

    I have recently purchased a MacBook Pro, and would like to move my iTunes music library from my Windows Vista machine to the MacBook Pro. What should I be prepared for? I thought it would be an easy matter of taking my iTunes library and copying it o