JTabbedPane - How do I stop it from resizing?

I am resizing a jTabbedPane. Problem is, when a tab is selected, jTabbedPane revalidates and repaints, causing it (and any other controls inside its container that were resized, moved) to go back to the original size; is there any way around this? why is it going back to its ORIGINAL size, eons after its been resized? I know how much SWING loves to be in control of the layout, but pllleeeeeeeeeaaaaaseeeeeeeee...
ps: i am using the XYLayout manager, but this behaviour is evident in all layout managers..

are you doing something squirrely with the layout? you are absolutely correct that Swing is obnoxious about resizing things after the fact. have you tried taking the components in the JTabbedPane and dropping them in a JPanel in a JFrame and resizing them from there? (i.e.: test that your layout mechanism is correct.)
something else that might help is to use the setPreferredSize(), setMaximumSize() and setMinimumSize() methods.
i recently laid out some JButtons with ImageIcons in them that were fixed 24x24 pixels. when i put them in a GridBagLayout, they were fine until i started resizing the parent JFrame. calling just the setPreferredSize() method was not enough to solve the problem, despite the fact that Swing often ignores the other setXXXSize methods. if you have static size components, this may do the trick.
if that doesn't help, post the code.
good luck,
jon/hackerx

Similar Messages

  • How do I stop text from resizing to the size of the browser window

    Hello there,
    I am using a DW CS3 template that has a sidebar div and a
    main content div - the text in the main content div keeps resizing
    to the size of the browser window - I don't want the text to resize
    if I make the browser window smaller - I want it to remain the
    same. I am trying to float the text right and input a width but
    this is not working for me. What am I doing wrong?
    HELP!
    Many thanks!

    >>What am I doing wrong?
    Not giving us a link to the uploaded page so we can see the
    page, how it
    behaves and the actual code.
    Until we see that you are unlikely to get a definitive
    answer. The problem
    is unlikely as you state it because text itself is never
    dependant on the
    browser viewport size.
    Walt
    "Fun Leprechaun" <[email protected]> wrote
    in message
    news:g9f7rq$ie4$[email protected]..
    > Hello there,
    >
    > I am using a DW CS3 template that has a sidebar div and
    a main content
    > div -
    > the text in the main content div keeps resizing to the
    size of the browser
    > window - I don't want the text to resize if I make the
    browser window
    > smaller -
    > I want it to remain the same. I am trying to float the
    text right and
    > input a
    > width but this is not working for me. What am I doing
    wrong?
    >
    > HELP!
    >
    > Many thanks!
    >

  • How do I stop iMovie from resizing photos?

    I have made a show reel that invloves a number of images that are of all different sizes and I want to keep them that way. iMovie enlarges the images that are smaller than the screen and I want to stop this happening.

    You don't have to select a complete folder, you can select individaul files or groups of files.  See:
    http://help.apple.com/imovie/mac/10.0/#mov6fa10197d
    Note that you can also drag files from a folder with the Finder into iMovie as an alternative to using the Import function.
    Geoff.

  • How can you stop slideshow from resizing the browser window iframe ?

    Does anyone know where the code is that causes the iweb slideshow to resize the browser window when it is opened?
    When it is placed on a page using <iframe src="http://homepage.mac.com/coreydee/slideshow/index.html" width="760" height="580" scrolling="no" style="border:none;" frameborder="0"></iframe> It resizes the browser window when it starts.

    Does anyone know where the code is that causes the
    iweb slideshow to resize the browser window when it
    is opened?
    When it is placed on a page using <iframe
    src="http://homepage.mac.com/coreydee/slideshow/index.
    html" width="760" height="580" scrolling="no"
    style="border:none;" frameborder="0"></iframe> It
    resizes the browser window when it starts.
    The iWeb .Mac slideshow, which you previously tried to add in an iframe, does have a function to resize the window. But it would not cause the whole window to resize, just page within the iframe so you would never know.
    However, the autoviewer one you are using should not do this.

  • In iPhoto how do I stop files from auto resizing as they import? I don't want my files reduced to 72. The option to choose size on the export menu not suitable for up sizing, as you can't restore the quality removed?

    in iPhoto how do I stop files from auto resizing as they import? I don't want my files reduced to 72. The option to choose size on the export menu not suitable for up sizing, as you can't restore the quality removed.

    Short answer: They are not resizing, there is no quality lost. The dpi is only set when you decide what size you're printing at
    Longer answer:  Dpi means nothing in the digital world of your computer. There are no "inches" to have "dots per..." Size is measured in pixels. That's the same on your camera. It doesn't take 10 x 8 or 6 x 4 shots. It takes shots measured in megapixels. For instance 4,000 x 3,000 is a 12 megapixel camera.
    Using that example, that shot from that camera has 12 million pixels. So that's how many "Dots" there are. To decide the ratio of dots per inch, you now need to decide the "inches" part. And that's printing. Print at 10 x 8 and the dpi will be 4,000/10 or about 400 dpi. At 6 x 4 then it's 4,000/6 or 660 dpi. Work the other way: Print at 300 dpi and the resulting image will be about 13 inches on the longer side.
    So, your photo as a fixed number of pixels. Changing the dimensions of the print will vary the dpi, changing the dpi will vary the dimensions of the print.
    For more see http://www.rideau-info.com/photos/mythdpi.html
    Regards
    TD

  • How do i stop PS from deleting transparent Pixels on layers?

    Hello community,
    i have a problem concering the place-function of Photoshop CS6. I want to include hundreds of png files in a psd file and i want them to keep their original size. Unfortinatly they have transparent borders and PS deletes these borders when you place the images in the PSD-file. For example: I have a square with x=50px and y=50px and it is positioned in an png with the dimensions x=100px and y=100px. I want to have these kind of files in my psd-file an need to keep their full dimensions, because my graphic specifications relate to the 100px/100px size and i need it later in my workflow.
    How do i stop PS from cutting off the tranparent borders of my images?

    Yes Free Transform has what was set during the place and you can see in the option bar if the layer has been scaled or is at 100 % width and height. You can also drag out guide line to the transforms bounding box. Then later measure the size or drop in a low opacity pixel in two diagonal corners to force the bounds to the png's canvas size.   However if you don't add those pixels in a script the bounds you get is that of the bounds of the non transparent pixels and in an action Ctrl|CMD clicking the layers content in the layers palette selects the non transparent pixels.
    My Photoshop Photo Collage populating scripts do not always fill an image area when they resizing odd shaped png images, However if the png is rectangular with transparent borders the script will fill the area with pixel for the scripts gets the bounds of the non transparent pixels, not the png canvas size. So resizing works well. There is a difference between layer size and canvas size in the png file. Layers can also be larger then canvas size in psd files Photoshop support any size layer you have the canvas act like a cropping mask on a document.
    Message was edited by: JJMack

  • How do I stop iTunes from automatically importing songs I listen to from my external hard drive into the music library?

    How do I stop iTunes from automatically importing songs I listen to from my external hard drive into the music library?

    Mac OS X: Double-Clicking a File Opens the Wrong Application - http://support.apple.com/kb/TS2291
    -= Changing the application used to open all files of a certain kind (written with reference to OSX 10.4 but may not have changed) =-
    1) In a Finder window highlight a file of the kind you want to change the application to open that kind of file.
    2) While that file is highlighted, select File > Get Info or press command (apple or propeller icon) + i to get a file information window.
    3) In the lower part of the info window there is an "open with" menu with a list of applications.
    4) If your application is already in the box then it is the default application for opening that kind of file and you don't need to do anything more.  Close the get info window.
    5) If the application showing in the menu is not the one with which you wish to open the file then select a new application. If your application does not appear there then select the "other..." and track down the application (usually in the Applications folder at the main level of the computer).
    6) If you wish to change all files of this type to open with this application in future, make sure the "change all" button is selected.
    7) Close the get info window.

  • All my excel files were converted to pdf. Why would this happen and how do i stop it from doing so?

    All my excel files were converted to pdf. Why would this happen and how do i stop it from doing so?

    shloimypt wrote:
    All my excel files were converted to pdf. Why would this happen and how do i stop it from doing so?
    Relax, they weren't converted to PDF.
    You can tell by right clicking ANY of them and choosing "Properties". You'll see there that they're STILL .xls or .xlsx files. The "association" has changed and Windows now indicates that they open with Reader, which isn't right.
    Where it says "Open With" under the General tab, you can click "Change" and re-select Excel as the default app to open thim.
    See: http://helpx.adobe.com/acrobat/kb/application-file-icons-change-acrobat.html

  • My wife and I have iPhones and are receiving each other's text messages. How can we stop this from happening? Is this an Apple ID problem?

    My wife and I have iPhones and I am receiving her text messages. Is this an Apple ID issue? How do I stop this from occurring?

    Settings / Messages
    on setting Send &Receive, deselect the other spouses email address. 
    You are sharing ring the same AppleID which is designed for 1 person. 

  • I just downloaded the latest version of firefox (5.0). Can I delete all the older versions that are still on my drive? 2) When I call up some web sites sometimes the web site comes up 3 or 4 times...how do I stop this from happening?

    I just downloaded the latest version of firefox (5.0). Can I delete all the older versions that are still on my drive?
    When I call up some web sites sometimes the web site comes up 3 or 4 times...how do I stop this from happening? For example if I click on a link the exact same link comes up 3 or 4 times and I have to manually delete all of them but one.

    Do you organise your email into separate folders, or do you just let it accumulate in the Inbox?
    I would strongly advise you not to let it sit in the Inbox.
    When you see this happening, try right-click on the affected folder, select '''Properties''' then '''Repair Folder'''.
    Large folders (actually, a folder in Thunderbird is stored as a file, so it is sensitive to file size limits set by the underlying file system) can be problematic. This is one reason not to let messages collect in one folder. I use Thunderbird's Archive folders so that accumulated mails over several years can happily coexist because they are effectively stored in many small folders. No single mail store folder then exceeds the 2GB or 4GB sizes that have been known to stress the OS. I appreciate that current builds of Thunderbird and a modern 64-bit OS should be able to cope, but practically I find it slows down when given huge files, so I err towards a pragmatic solution; a large number of not very big files.
    Archives are searchable, and a Saved Search folder can give you a virtual composite folder allowing access to the entire Archive.

  • TS2755 I have 2 phones on my apple id acct. And when I text message that person I am getting a duplicate message to myself. How do I stop this from happening

    I have 2 phones attached to my apple ID account and when I text message that person, I am getting a duplicate message sent back to me.  How do I stop this from happening?

    Make 3 different iCloud accounts and use ONLY for iMessage.   That will permanently fix your issue.

  • How do I stop itunes from corrupting it's library on almost a daily basis?

    How do I stop itunes from corrupting it's library on almost a daily basis?  It's actually becoming infurating to use, and what's happening is I am losing my downloads since the last automated itunes backup (having to rename & replace the current corrupted library with the last backup which is usually a day or two old).  What can cause this?  Is there ANY alternative to using itunes for Apps (which is the sole use I have for it)?   If not, APPLE PLEASE REMOVE THE NEED FOR THE DATABASE SO IT DOESN'T HAVE THE ABILITY TO CORRUPT ITSELF...  :'(

    Things you see in iTunes are stored in various sub folders in your main iTunes folder as in:
    Image of folder structure and explanation of different iTunes versions (turingtest2 post) - https://discussions.apple.com/message/13025536 and https://discussions.apple.com/message/17457605
    Start iTunes and immediately hold down the option key.  Create a new library somewhere.  Go to your old iTunes folder and drag items to the window for the new library.  Maybe only grab a folder or part of one at a time.  It will copy these items to the new library (so you need lots of extra room on your computer).

  • Imovie 09 How do I stop Imovie from auto importing video from iphoto

    Imovie 09 How do I stop Imovie from auto importing video from iphoto.
    Hi I've done a lot of searches on how to do this but no answers found.
    Imovie is beginning to become really slow because of the large number of video's. It takes 3 minutes to startup. Editing is sometimes slow lot's of spinning beach balls e.t.c.
    I would like to only import the video I want to edit and hopefully get a quicker Imovie in the process.
    My Iphoto library is about 95 Gbyte in size.
    My mac has 4 gb ram and I use the internal disk.
    Any other ways to work with Imovie/Iphoto are also welcome.
    regards

    I won't get iMovie 9 till Tuesday, but based on what you said I may need to take some precautions. One reason I didn't like iMovie 8 is because it automatically imported everything in iPhoto library. What I'm going to do is create a new iPhoto library before importing the photos/videos from the camera. Or if you already have it in your main iPhoto library copy only the photos you'll use in your iMovie 9 project to the new library. Then start iPhoto while pressing the option key which will allow you to select the new iPhoto library you have created. Then I suppose that when you start iMovie 9 it will automatically import only the photos/videos from the new library.

  • How do I stop firefox from automatically placing the cursor in a textbox?

    How do I stop Firefox from automatically placing the cursor in a text box? On certain pages such as Google.com the cursor will be moved to the search text box automatically after a couple seconds from the page loading. So I'll be typing in the address bar or something and then half of what I am typing in the address bar becomes cut off and starts being entered in the Google.com text box for search. The same happens on Facebook.com and the cursor is automatically moved to the Status Update text box. I assume this is a built in "feature" of the web page, but it's damn annoying. Especially when I start typing in my status update box on Facebook before the page completely loads and then halfway through typing (once the page is done loading) my cursor is moved to the starting position of the text area and my text is cut off.
    Just the be clear the actual mouse pointer isn't being moved, just the prompt for entering text.
    How can this be stopped?
    == This happened ==
    Every time Firefox opened
    == Started since I can remember

    This problem has grown worse over the last couple of years. I use Firefox on Mac and Windows. I consider this problem to be a bug. Here's why: Event Driven interfaces, e.g., OSX and Windows, are never supposed to change typing-cursor focus WHILE SOMEONE'S TYPING!!!
    Firefox allows websites to change focus WHILE USERS TYPE!
    Hey, sorry for the caps, but I haven't used those for awhile and that's kind of fun. But really, more and more websites steal typing-cursor focus WHILE USERS TYPE.
    Efff them, but really, Eff Firefox for allowing this.
    It's almost like a symptom of our hyper scattered age where our attention jumps here and there.
    But really... I love Firefox, some of my best friends are Firefox, they're good people, don't get me wrong, but damn it, WHEN SOMEONE IS TYPING THE UNASSAILABLE RULE OF EVENT DRIVEN DESIGN IS NOTHING ELSE SHOULD CHANGE FOCUS WHILE SOMEONE IS TYPING!!!!
    FIX THIS PLEASE.
    Oh, I just ran out of capital letters. :) :) :)

  • How do I stop Firefox from auto-focusing on text boxes?

    How do I stop Firefox from auto-focusing on text boxes? Sometimes as a page is loading, I scroll down the page...only to have the page jump back to where there is a text box, with a blinking cursor, after the page is finished loading. It is an annoying feature and I want to turn it off.

    Some pages use an onload event to set the focus to a text area or search field.
    You can try NoScript to see if that blocks it.
    *NoScript: https://addons.mozilla.org/firefox/addon/noscript/

Maybe you are looking for