JInternalFrames  that snap back to their original size and bounce around

1. How do I make the JInternalFrames not snap back to their original size after I resize them (drag with mouse)?
2. How do I bet the internal frames(minimized or open) to not bounce around when I add a new one?
Thanks!!
here is the code:
//DM.java
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
public class DM extends JFrame{
Container contentPane;
JDesktopPane deskTop;
int queryCount = 0;
/////////////////// CONSTRUCTORS ////////////////////
public DM(){
super("Data Miner 0.1, Triad Therapeutics, Inc.");
     contentPane = getContentPane();
     deskTop = new JDesktopPane();
deskTop.setBackground(new Color(0,0,150));
deskTop.setLayout(new FlowLayout());
contentPane.add(deskTop, BorderLayout.CENTER);
////// MENU BAR ////
          JMenuBar menuBar = new JMenuBar();
//// Query Menu
     JMenu queryMenu = new JMenu("Query");
     JMenuItem targetQueryItem = new JMenuItem("Target");
queryMenu.add(targetQueryItem);
////// MENU BAR ASSEMBLY ////
menuBar.add(queryMenu);
setJMenuBar(menuBar);
////// MENU BAR ACTION LISTENERS ////
targetQueryItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e){
JInternalFrame qc = new JInternalFrame("TEST2",true,true,true,true);
qc.setPreferredSize(new Dimension(500, 300));
          qc.setNormalBounds(new Rectangle(300,300));
//qc.setBounds(10, 50, 300, 500);
//qc.setVisible(true);
qc.show();
deskTop.add(qc);
}// end DM constructor
////////////////// MAIN METHOD /////////////////////////
public static void main(String[] args){
     DM dm = new DM();
               dm.setBounds(10,100,1000,450);
               dm.setVisible(true);
               dm.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
               dm.addWindowListener(new WindowAdapter() {
                    public void windowClosed(WindowEvent e) {
                              System.exit(0);
}//end main
}// end DM class

Use the direct select tool to select the image, then set the scale in the scale fields to 100%, and finally, fit frame to content.

Similar Messages

  • Unable to move objects (They snap back to their original place) and certain menu items don't work

    Using CS5, have been using this version for over a year and have never seen this problem -
    When I try to move any object by selecting and then trying to drag, it won't let me. It allows me to drag while selected maybe half an inch before not moving anymore, and then snaps back to the original position anyway. I CAN move by using transform - move, or selecting and using arrow keys. When I restart my computer everything seems fine, but then it soon gives me this same problem.
    Also, when I'm having the object moving issue I also have problems with dropdown menus. For example when printing, I can see the list of printers, but clicking them has no effect. Another example is the Preferences menu box, clicking "Type" or "Units" has no effect.
    Please help!!

    Win or Mac? Do you have 15.02, if not install the update.
    http://www.adobe.com/downloads/updates.html
    Select All and in transform palette uncheck Align to pixel grid.
    Reset your prefs. After botting hold down these 3 keys
    MAc - Shift Opt Command
    Win - Shift Alt Ctrl
    Do you have any 3rd parts Ilustrator plug ins? If you are on windows can you do a system restore back to a date before this was happening (Win is much more susectible to mallware/trojan horse/virus)

  • Drag and Drop Shapes that snap back to its original position, if it is placed in the correct shape it stays there. What code can I use? PLEASE HELP!

    I need the code for this, how could I possible do this?
    I'm a begginer and I am very interested as to how I can create this.

    using the same initialization code shown in your previous post, use:
    // in your drop listener function
    if(square.hitTestObject(whatever)){
    square.x=whatever.x;
    square.y=whatever.y;
    } else {
    square.x=square.initX;
    square.y=square.initY;

  • Firefox does not load long images, pixelates images if they are not in their original size, and has problems with thumbnails (in some sites)

    Firefox has problems with images.
    In sites like deviantART or ImageShack with full-view option, images that are not in full size/thumbnails get slightly pixelated e.g. http://img251.imageshack.us/f/screenshot2tq.jpg/
    Long images get completely messed up if full-viewed e.g. http://img689.imageshack.us/f/screenshot5z.jpg/ (though if the file is only big, it loads just fine)
    Also, thumbnails in some sites get messed up e.g. http://img201.imageshack.us/f/screenshotyr.jpg/
    And in general, Firefox has more 'glitches' like not allowing to add more search engines. It wasn't like that before and I can only assume that it got messed up somewhere with updates, but I'm not really sure.
    I've tried cleaning out cache, re-installing Firefox (multiple times) and even downloaded Firefox 4 beta, but the problem remains.
    I use Ubuntu.
    Does anyone else have similar problems? Or know where the problem lies?

    Do you have the latest driver for your graphics display card?
    Create a new profile as a test to check if your current profile is causing the problems.
    See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting: Make a new profile]]
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    See http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • I pressed  some keys in iPhoto and the picture "icons" shrunk. How to get them back to their original larger size?

    I pressed  some keys in iPhoto and the picture "icons" shrunk. How to get them back to their original larger size?
    I read another post about this that suggested restoring preferences, but I don't know how to do this. I don't want to re-install iPhoto for sure.

    My bad. I didn't see the slider lower right (it was mentioned in the reply).
    Now can somebody tell me how to delete questions

  • Recovered files in the trash.  How do I put them back to their original place so that they do not keep being recovered very time I open my Mac?

    I keep getting the same recovered files in the trash.  How do I put them back to their original place so that they do not keep being recovered very time I open my Mac?

    The recovered files are temporary files used by Mac OS X applications. Usually temporary files are deleted by an application when it no longer needs them. If an application quits unexpectedly, the temporary files may not be deleted by the application. When you restart your computer, Mac OS X moves these temporary files to the Trash.
    You can retrieve useful files by dragging them out of the Trash. In most cases, however, the temporary files are not important and it is safe to empty your Trash. Check with the manufacturer of the application if you are not sure.

  • Is is possible to have the images as thumbnails and make it so you can click on them for a larger view and then click them again to have it go back to the original size? In an interactive pdf?

    I am designing an interactive catalog in a pdf. Is it possible to have the images as a thumbnail and then click them to enlarge the image and then click again to make them go back to the original size?
    Thank you in advance!
    Stephanie

    It can be done with Show/Hide buttons:
    Here's a button created from a small version of the image (notice that it's selected in the image below):
    The small button has a Show/Hide Buttons and Forms action. It's action is to make the Larger Image visible (eyeball turned on) with the small image hidden (eyeball turned off).
    The large image is also turned into a button (shown below):
    Notice the checkbox "Hidden Until Triggered". The large button is hidden until it's triggered by the small button. Clicking on the large image also causes a Show/Hide action which shows the Small button and hides the large button.

  • How do I export all the photos I imported back to their original folder

    How do I export all the photos I imported back to their original folder just as they were, they haven't been modified, adjusted etc. I imported them by mistake.

    You don't need to worry. You won't lose photos when the 30 day trial expires.
    Lr is different than other photo editing software in that it works with a data base (called the "catalog"). Lr does not write anything into the image pixels but stores everything that you do in Lr into its catalog (=data base). That way, when the trial expires your images will still be there, but - since you cannot access the Lr catalog anymore - your photos will be in the state they were before you imported them into Lr.
    When you work with Lr you have to really understand the concept of the "catalog", if you don't you will come into very frustrating situations. The concept of "catalog" involves above all that you need to think of your images based on two different files that are in different locations on your computer. One is your image file (Raw, JPG, TIFF) and the other is the data entry written for this image into the Lr catalog. Lr constantly updates this catalog (without you having to hit <save>) and constantly combines the image file with the data from the catalog. From this follows the demand that you take care of the Lr catalog as much as you take care for your image files - by knowing where they are located on your computer and by doing regular backups.
    Would it be worth the investment? In my opinion definitively "yes"! I work with Lr since version 1 on a daily basis and would not want to miss it. Lr gives you superior image editing possibilities (in the Develop Module) but - as already said - is also a superb image management tool. Lr will keep track of all of your images irrespective if they are on internal or external hard drives. With Lr you have all of your images available all the time.
    But Lr has also a steep learning curve. You cannot just jump in and do things because you'd create havoc and become frustrated. There are excellent books but for starters I would recommend that you watch the video tutorials on Adobe's website. You learn from them easily because you see on your screen what the instructor does, where he clicks, where the different tools are, etc.
    Here are some links:
    http://tv.adobe.com/product/lightroom/
    http://tv.adobe.com/show/adobe-evangelists-julieanne-kost/
    http://tv.adobe.com/show/learn-lightroom-3/
    If you decide to buy, you can do so on Adobe's website. You will then be e-mailed a serial # that will unlock your trial version for indefinite time.

  • Original Size and Resolution (How do I access that file)

    If you go to your photo album and click 'veiw larger image' you receive this message:
    Note: This picture may be displayed smaller than the actual picture size. The original uploaded image size and resolution are preserved in your account.
    The same question was posted with a solution to send the photo to your e-mail account. The does not resolve my problem. I should be able to access the original size and resolution here, online, in my account.

    You should be able to sign in to your account with Adobe to retrieve the serial number.  Then download version 7 from here:
    Download Photoshop Elements products | 9, 8, 7
    Worst case option:
    Download the trial version of Photoshop Elements 13:
    Adobe Photoshop Elements 13 Direct Download Links, Premiere too | ProDesignTools
    and save it as a tiff or jpeg and you can open it with any photo viewer.
    You may even find that you want to buy the latest version.

  • How can I keep apps in the order I prefer?  I've rearranged via iTunes but every time I power cycle the phone, the apps go back to their original positions...

    How can I keep apps in the order I prefer?  I've rearranged via iTunes but every time I power cycle the phone, the apps go back to their original positions...

    Hi kelori617,
    If you are having issues organizing the Apps on your iPhone via iTunes, you may want to double-check the steps in the following article and make sure you are syncing any changes to your device:
    iTunes 11 for Mac: Sync and organize iOS apps
    http://support.apple.com/kb/PH12115
    iTunes 11 for Windows: Sync and organize iOS apps
    http://support.apple.com/kb/PH12315
    If all of the steps are correct and the changes still aren't being retained when you restart your iPhone, you may want to make sure your data is backed up, then try restoring your iPhone to factory settings, restore your data from the backup, then test to see if you can organize your apps via iTunes:
    Use iTunes to restore your iOS device to factory settings
    http://support.apple.com/kb/HT1414
    Regards,
    - Brenden

  • After editing a photo in another program, the photos return to the library at the end of the grid panel instead of at their original loacation.  How do I avoid this or alternatively, is there a quick way of moving them back to their original position inst

    After editing a photo in another program, the photos return to the library at the end of the grid panel instead of at their original loacation.  How do I avoid this or alternatively, is there a quick way of moving them back to their original position instead of clicking and dragging them?

    Sort your photos by File Name or Capture Date
    Use View->Sort

  • I was adding items with the intent of command z 'ing them back to their original when it crashed, autosaved, and my original numbers were lost to the temp numbers plugged in... how can i get back to the previous version? Because it had closed, command z

    I was adding items with the intent of command z 'ing them back to their original when it crashed, autosaved, and my original numbers were lost to the temp numbers plugged in... how can i get back to the previous version? Because it had closed, command z

    Sorry, this happened in CLOUD numbers....

  • I recently upgraded our iMac to Yosemite OS and now have a problem with Photoshop Elements 11:  the move tool selects an image or text layer, but then I try to drag the selection somewhere else on the page and it snaps back to the original location, howev

    I recently upgraded our iMac to Yosemite OS and now have a problem with Photoshop Elements 11:  the move tool selects an image or text layer, but then I try to drag the selection somewhere else on the page and it snaps back to the original location, however the arrows will move it OK.  Also I cannot drag the selection to another photo in the photo bin as before.

    Hi,
    Please refer: http://helpx.adobe.com/photoshop-elements/kb/pse-stops-responding-yosemite.html
    Thanks,
    Anwesha

  • Original size and no smoothness

    Hi Guys,
    I have a problem when I’m importing videos. The original video size is 480x360 aad when I’m importing it the video gets all messed up. It’s very important with this video that there is no change in it at all, because it’s pixel art. So smoothness is not allowed.
    I’ve made a screenshot:
    www.ee-design.dk/gfx/imovie.gif
    Can anyone help me out here?

    1) The format is .mov.
    Sorry, I should have been more precise. There are many kinds of video formats used by QuickTime movies that have the ".mov" extension.To learn what your movie is, open the movie you imported in QuickTime Player, then press Command-I (that's an eye). The window that opens tells you what format the movie uses. Tell us what it says, plus the movie size (perhaps 480x360.)
    2) When I'm importing the file there is only two sizes to pick between. 960x540 and 1920x1080. I don't se any other options.
    Those sizes are offered only for a particular type of video, 1080i. They probably don't apply to your video. Other movies are automatically imported at their original size.
    3) I*m exporting it in the same size.
    There are many ways to export an iMovie '08 project. Tell us which menu commands you are using to export yours.
    Karl

  • The photos in my IPhoto have all become mini-thumbnails and I can't open or edit them. When I print the image it comes out normal size.  How do I get the thumbnails back to the standard size and be able to work with them?

    The photos in my IPhoto have all become mini-thumbnails and I can't open or edit them. When I print the image it comes out normal size.  How do I get the thumbnails back to the standard size and be able to work with the photo files?

    What version of iPhoto and system are you running?  On the guess that you're running the latest iPhoto, 9.4.2, Try the following:
    1 - launch iPhoto with the Command+Option keys held down and rebuild the thumnails, Option #2.
    2 - It may take 2-3 attempts so don't give up after only one attempt.
    OT

Maybe you are looking for