Why do buttons become wider when switch Look & Feel

When changed look and feel, all JToggleButtons become wider. I looked up
this forum, but failed to get a solution. Please help me. Thank you in advance.

Exactly!
This question was asked just a few days ago.
DB

Similar Messages

  • Why Glass Pane becomes visible when resizing JInternalFrame?

    This qustion has been asked _*here*_ but got no response.
    Hello,
    I've created a JFrame with JDesktop and one JInternalFrame on it. I've also added a glasspane (which draws a black circle only) to JFrame - it's invisible by default but when I resize JInternalFrame it shows up.. is this correct behavior? Why it is visible only when I resize and diappears when I release mouse button after resize? How I can make it invisible when resizing JInternalFrame? (Is removing JFrame's glasspane only solution?)import java.awt.Graphics;
    import javax.swing.JDesktopPane;
    import javax.swing.JFrame;
    import javax.swing.JInternalFrame;
    import javax.swing.JPanel;
    public class RunMe extends JFrame {
         public RunMe() {
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              this.setBounds(10, 10, 800, 600);
              JDesktopPane desktop = new JDesktopPane();
              JInternalFrame testJIF = new JInternalFrame("test", true, true, true, true);
              testJIF.setBounds(10, 10, 100, 100);
              desktop.add(testJIF);
              testJIF.setVisible(true);
              this.add(desktop);
              this.setGlassPane(new MyGlassPane());
              this.setVisible(true);
         private class MyGlassPane extends JPanel {
              public MyGlassPane() {
                   this.setOpaque(false);
              @Override
              protected void paintComponent(Graphics g) {
                   g.fillOval(0, 0, 100, 100);
                   super.paintComponent(g);
         public static void main(String[] args) {
              new RunMe();
    }

    First of all, thank you for being upfront about cross posting.
    Whether this is "correct" behavior or not may be debatable, but it's certainly expected behavior. From the source of javax.swing.plaf.basic.BasicInternalFrameUI.BorderListener.mousePressed (towards the end of the method)Container c = frame.getTopLevelAncestor();
    if (c instanceof RootPaneContainer) {
       Component glassPane = ((RootPaneContainer)c).getGlassPane();
       glassPane.setVisible(true);
       glassPane.setCursor(s);
    }The glass pane is made visible to show the resize cursor.
    It's set back to visible(false) in finishMouseReleased() which is invoked from mouseRelease and elsewhere (e;g; from cancelResize which is invoked from windowLostFocus)
    Looks like you can't use the glass pane for whatever you had planned, the Swing designers have already used it for something else. Or this could be a workaround, depending on exactly what it is you're trying to do.@Override
    protected void paintComponent(Graphics g) {
       super.paintComponent(g);
       if (this.isOpaque()) {
          g.fillOval(0, 0, 100, 100);
    }You could also declare and use a boolean flag, rather than using isOpaque (which may happen to be set/reset somewhere else in the Swing code ;-)
    db

  • Why are objects becoming distorted when zoomed in?

    Lets say for example that I create a target shape at a relatively large size. I will then shrink it down to a more appropriate size and proceed to zoom in on the object. When I zoom in, the target becomes completely distorted. This is a problem that I came across recently as I have just upgraded from cs4 to cs5.1. Since Illustrator is vector based, objects should be crisp and look the same whether they are scaled to the size of the full artboard or down to just 1% of it, correct?
    I have posted a screen shot of the issue that I am running into below. The larger shape on the left is normal, and the shape on the right is that same shape just scaled down. Note: this shape does not have strokes, it is a solid fill. Thanks for any help in advance!

    This is what I had originally thought was the issue, so I created a new doument making sure to uncheck the box for the pixel grid. I then dragged the above shape into the new document and the problem persisted. However, when I recreated a similar shape in the new document, there was no distortion (as expected). It seems that for some reason an object created in a document with the pixel grid option turned on keeps those settings when carried into the new document.
    Is there a way around this or am I going to have to recreate everything in the new document?
    Thanks for tee response, btw!

  • SSIS: Why do columns become misaligned when importing flat files?

    Hi All
    I am stumped with the following.
    When I try to load a fixed length flat file into a table, the first few thousand records load correctly but then the columns start going out of sync.
    Visually it looks like the data is drifting off to the right. Below is what the table looks like when the load completes:
    Col1    Col2    Col3    Col4
    1        1         1         1
    1        1         1         1
      1        1         1         1
       1        1         1         1
        1        1         1         1
          1        1         1         1
            1        1         1         1
    Additional info:
    1. The file has 400 000 records.
    2. The first few thousand records load OK.
    3. Source file is a flat file, fixed length, no delimeters.
    4. All rows are same length, with LFCR.
    I tried using a script task to check with C# if all rows are the same length and has the same line terminator, and could  not pick up anything out of the ordinary.
    What could be the cause?

    Thank you for the reply.
    I discovered the source of the problem, but still don't understand how to solve it.
    There is one extra character in one of the columns every few thousand lines. This is the character: �
    I don't understand why all the rows following a corrupt row is shifted by one character and not just the effected row?
    Secondly, via a script task, SSIS indicates that the length of the row is still the same, despite the extra character. Is it possible that SSIS does not recognize this character and this is what is causing all columns to shift / mis-align?

  • Photoshop CS5 becomes unresponsive when switching programs?

    Photoshop CS5 becomes unresponsive if I switch to another program (ie acrobat, word, google chrome). The menu's still work, but pan, zoom, move, etc. have no effect on the image.  I have to save and restart to make the program work correctly and it will do it again as soon as I switch to another window.  I'm not sure what this issue would be called (maybe a redraw error), but does anyone have an idea of how to fix this?

    Without system information nobody can advise specifically, but sounds like graphics issues. Update your graphics driver.
    Mylenium

  • Why my iPhone becomes hot when using 3G

    I noticed recently that my iPhone becomes really hot specially when I'm on 3G. Is thar normal?

    It is normal for the phone to get hot when your using data such as YouTube videos, streaming music etc.. And as for the left speaker not working, the left speaker is a microphone, the right one is for sound. Don't worry, everything your iPhone is doing is normal.

  • ARD and screen sharing become unresponsive when switching users

    This problem is STILL occurring with 10.6.6 and ARD 3.4. See this archived thread for prior information:
    http://discussions.apple.com/thread.jspa?threadID=2177922
    Whenever I'm sharing the screen of any headless Mac and I attempt to use fast user switching, the screen sharing window closes and I am unable to reconnect to screen sharing on the remote Mac until I reboot it.
    This isn't a one-off problem with some esoteric feature that is rarely used. This is a serious bug related to an established and useful feature of the operating system. This problem has been happening for more than a year over Mac OS X versions since at least 10.5.8. There is an OpenRadar bug report for it. (See archived thread link.) This problem is an enormous pain to me and the enterprise customers I represent Apple to.
    <Edited by Host>

    Aaron Adams (.Mac) wrote:
    This problem is STILL occurring with 10.6.6 and ARD 3.4. See this archived thread for prior information:
    http://discussions.apple.com/thread.jspa?threadID=2177922
    Whenever I'm sharing the screen of any headless Mac and I attempt to use fast user switching, the screen sharing window closes and I am unable to reconnect to screen sharing on the remote Mac until I reboot it.
    I agree completely. This a HUGE bug. I've just installed a MacMini with OS X server for file serving, VPN, and application services. I run it headless, and it an enormous pain not to be able to switch users. Apple needs to address this.

  • Why does Safari become unresponsive when more than 20 windows are open

    Does 3.0.3 fix this?
    It is extremely annoying to wait for the beachball for minutes on end after a certain number of windows( 15 to 25) are open. You can't open a new one , you can't close old ones, you can't scroll, you can't use the back arrow, you can't bookmark.
    I have tried iFreeMem to clear memeory, Empty cache, Clear History, keeping desktop clear of icons, nothing works.
    Mi compadres in the Photoshop Forum believe it is a file swap issue and the disk is being accessed repeatedly, but I don't think so. Fire Fox does the same thing but allows more windows to be open.
    I don't have any unresponsive or slow issues with anything else. Safari has always done this since at least 10.4

    It's not that I'm unfamiliar with tabbed browsing, I use it three times a day in Firefox for work purposes. Firefox has a less awkward tabbing scheme, for one thing.
    I't just that I never thought there would be a problem following links and leaving the previous windows open.
    Moving 25 gigs of files off my hard disk showed a temporary improvement in the number of windows I could have open in both FF and Safari, but it seems to have reverted to about 20 in S and 40 in FF. This , I thought, indicated that it was indeed a swap file slowdown, but now I don't think so. The next time I start linking, I'll use Open in Tab and see what happens. Not tonight, too tired.

  • Setting Themes for Java Look & Feel

    Hi All,
    I am tring to set my customized theme to Java Look & Feel. I am able to set the theme using the following code:
    ASC_WhiteSatin theme = new ASC_WhiteSatin();
    MetalLookAndFeel.setCurrentTheme(theme);
    The above code works fine and changes the color schemes correctly.
    If I set another theme after setting the previous one i.e.let say abc Theme, dialogs and frames are updated properly where as JFileChooser start showing combination of both. Why?
    I am also updating the Look & Feel and calling
    SwingUtilities.updateComponentTreeUI(this);
    SwingUtilities.updateComponentTreeUI(this.getParent());
    ((JFrame)this.getParent()).pack();
    to refresh the themes for my frame. I am using JDK 1.4.1.
    Thanks in advance
    Wahaj

    try the beta-version of 1.4.2

  • Photos in Develop module look different when switching to library module

    Hello everyone this is my first post on adobe.  I ran into a problem today for the first time using lightroom 5.  I recently purchased lightroom 5 about 2 weeks ago and have been in love using it.  I have ran into 0 problems until today.  I uploaded some new photos and was going through them under the develop module editing the photos and what not.  When I am done editing I usually go to the library module and export them.
    Today I tried to do that exact thing and ran into this issue:  the colors in the photo are changing ever so slightly when I switch to the library module and are not exporting exactly as I edited them in the develop module. 
    I have tried changing the contrast/clarity to see if it would remain when switching and it does.  But for some reason the yellow on the flower in the picture becomes less vibrant when seen/exported from library module.  It is very frustrating because I spend alot of time editing the photo in a develop module and every transfers but the colors it seems.  It becomes more dull and less vibrant.
    It is not the photo itself.  I think it is something wrong with my lightroom?  I uninstalled and reinstalled and the same issue keeps happening.

    Just to clarify. When you compare the exported image to the original inside LR do they look the same when viewed together in the Library module, and how about when both are viewed in the Develop module? Are you using a wide gamut monitor and do you also use a hardware monitor calibrator? All of these things affect how images looks in LR and some are fixable, but others are not as Web Weaver posted.
    There is also another issue that can cause the Library module view and exported images to look different than they do in the Develop module:
    http://feedback.photoshop.com/photoshop_family/topics/afm8rbh6tnc31
    The solution is to view the image at 1:1 (100%) view size. You can also use more conservative Sharpening settings (i.e. lower) and more aggressive Luminance Noise Reduction settings (i.e. higher), which will significantly decrease the view difference.

  • Why does excel automatically load when i switch on my iMac

    Why does excel automatically load when i switch on my imac

    Please don't post in the PPC forum unless you are using a PPC machine.
    Dealing With The Resume Feature of Lion
    Managing Mac OS X Lion's application resume feature.
    If you shutdown your computer you should get a dialog asking if you want applications to resume on the next startup. Simply uncheck the box to prevent that from occurring. Open General preferences and uncheck the option to Restore windows when quitting and re-opening apps. You can also install a third-party utility to control resume features on individual applications: RestoreMeNot or Application State Cleaner.
    It is possible to completely stop the Resume feature although I'm unconvinced that it is that annoying. Nevertheless see the following:
    If you have not yet done so you must first make your /Home/Library/ folder visible. Open the Terminal application in the Utilities folder. At the prompt paste the following command line:
    chflags nohidden ~/Library
    Press RETURN. Quit the Terminal application.
    In the Finder navigate to the /Home/Library/Saved Application State/ folder. Delete the contents of the folder. Back up to the /Home/Library/ folder. Select the Saved Application State folder. Press COMMAND-I to open the Get Info window. In the Sharing and Permissions panel at the bottom click on the lock icon and authenticate. Set each of the listed entries to Read Only. Close the Get Info window.
    Quit all open programs except the Finder (this is very important.) Next, navigate to the /Home/Library/Preferences/ByHost/ folder. Look for a .plist file with "com.apple.loginwindow." in the file name followed by some numbers in hexadecimal. Select the file. Press COMMAND-I to open the Get Info window and in the Sharing and Permissions panel click on the lock icon and authenticate. Set each of the listed entries to Read Only. Close the Get Info window. If you also find a file with the same filename but with a last extension of ".lockfile," then you should delete it.
    The above should eliminate the Resume feature system-wide. Note that any future system updates or upgrades will likely undo these changes. You will then need to repeat this procedure assuming there are no major changes in OS X related to it.

  • Why is my ipad still using battery power when switched off & locked away with no one using it?

    Why is my IPad still discharging battery when switched off and locked away - with no one using it?  Charged it to 100% on holiday and locked in safe.  2 days later it was at 76%!

    How is it "switched off"? Are you pressing the button on the top so the screen goes black? If so, that isn't shut off, but put to sleep. I will still be doing things in the background and using battery power.
    To shut it fully off, press and hold the button on top, you will get a notification on the screen that says "Slide to power off". Slide the button and it will turn completly off.
    If this is how you switched it off, let us know and we will see what else we can figure out.

  • Why does it say headphones when i use the volume buttons

    why does it say headphones when i use the volume buttons instead of volume when the headphones are not plucked in?

    - Try cleaning out/blowing out the headphone jack. Try inserting/removing the plug a dozen times or so. There is a little switch in the headphone jack that disconnects the speaker when the headphone jack is inserted.
    Try the following to rule out a software problem
    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup
    - Restore to factory settings/new iPod.
    - Make an appointment at the Genius Bar of an Apple store. Seems you have a bad headphone jack.
    Apple Retail Store - Genius Bar
    If not under warranty Apple will exchange your iPod for a refurbished one for this price. They do not fix yours.
    Apple - iPod Repair price                  
    A third-party place like the following will replace the jack for less. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Replace the jack yourself
    iPod Touch Repair – iFixit

  • Why do my photos become uncropped when i upload to shutterfly?  I saved them as cropped photos in my album and followed the directions closely, but it keeps happening.

    Why do my photos become uncropped when I upload to Shutterfly using the Shutterfly app?   I correctly downloaded the photos to my iPad.  I then cropped them, enhanced them, and saved correctly.  I then created a new folder, put them in it, then used the Shutterfly app to upload them.   However, the uploaded versions are the originals before being cropped and enhanced.   I have tried this several times now and cannot figure it out.  

    There may or may not be something wrong with your colour settings or monitor calibration and profile. Quite possibly there isn't. You say you work in Adobe RGB space in Photoshop. If you're viewing Adobe RGB images which have no embedded profile in a browser then the images are extremely likely to look "washed out and faded". And if you're viewing images in a browser that's not fully colour managed then your images will look wrong there anyway, regardless of profiles.
    I suspect you're putting Adobe RGB profile images on the Web and not embedding that profile in the images.
    It's generally best practice to put sRGB images on the Web. You can work in Adobe RGB space in Photoshop but if you don't work in sRGB space then ensure images destined for the Web are converted to sRGB so there is the best chance of most viewers seeing a somewhat close approximation to what you see in Photoshop.
    Photoshop's Save For Web dialog has an option to convert to sRGB. Note that SFW has an option to embed the profile in JPEG but not PNG files. There is some debate over whether the profile should be embedded in images for the Web but my personal choice is to embed. So if I export sRGB PNG via SFW, I use Apple Preview to embed the sRGB profile.

  • Why do none of the links that I put in my outgoing yahoo emails no longer underline themselves and become live when I finish typing them and hit the space bar?

    Previously, when I typed my email address in an outgoing email or cut and pasted a link from my browser bar the link would become 'live' when I hit the space bar or 'enter' key. The link would turn blue and underline itself and the person receiving the email could just click on that live link and be taken to the site. Now the link does not turn blue or underline itself and the receiver must cut and paste the link into their browser bar to use it.
    Why? I did not change anything in Yahoo or Mozilla.
    I have deleted and reinstalled Java to no effect. I am using html in Yahoo.

    As it turns out, many others have been having similar issues on other browsers. It seems that maybe Yahoo! is taking a much longer time to load or something like that. Either way, its been working on and off all week, and the same issue even showed up yesterday with IE 8 instead of FF. It still loads faster than IE 8, but again is spotty. Some people think the issue may be with mail.yimg.com or s.yimg.com, which I could see was the loading url in the left corner whenever Yahoo! Mail was refusing to work. A couple of people said blocking it caused the issue. Alternatively, some people suggested blocking it to solve the problem. Does anyone have any information on that? Again, I have no add-ons that would be blocking any urls, and my firewall hasn't any records of it. I really don't want to do anything to mess up my browsers more than they may have already been. Thanks for all of your help so far!

Maybe you are looking for

  • Photoshop CS4 Freezes when opening PDFs

    When I drag two, 2-page PDFs onto Photoshop CS4 to open them, PS opens one page of one PDF and then freezes. I can replicate this every time I try. Once PS freezes it takes a little patience to get it to force quit. Any advice?

  • How do I display the DRM Metadata in a human-readable format?

    1. Ensure you're working with a metadata binary - if you extracted the DRM metadata out of an HDS or HLS manifest (.f4m or .m3u8), you will have to base64-decode the string into a metadata binary. 2. Run this following Java command line tool, which i

  • How can I clean up fonts?

    I recently purchased my first Mac 10.8. There are so many fonts. I know there are some that I need and that's indicated. But what about all the foreign fonts that they say are system fonts? How can I clean my fonts up and get rid of excess? Thanks

  • If-elseif in el.

    Dear All, can if-else if- else be used in el ??.. If yes then,Please tell me how.. Regards

  • The ptoblem is x:set  / doesn't work .

    xml file <?xml version="1.0" encoding="UTF-8"?> <person id='js890'> </person>jsp code <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %> <html>      <body>           <c:imp