Problems whit the LookAndFeel

Hi, i'm creating a GUI using Netbeans (windows xp), I want to use the cross plataform look and feel, so i write this code:
public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                   UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
                } catch(Exception e) {
                System.out.println("Couldn't use that look and feel.");
                setDefaultLookAndFeelDecorated(true);
                new NumeroCiclos().setVisible(true);
    }It work's OK, this is the picture of the window:
http://i55.photobucket.com/albums/g143/joserafa83/MetalLnF.jpg
But when i use the JOptionPane the look and feel is like the windows xp:
http://i55.photobucket.com/albums/g143/joserafa83/errorLnF.jpg
String time = jTextTime.getText();
        String freq = jTextFrequency.getText();
        double t = 0;
       try
            t = Double.parseDouble(time);
       catch(NumberFormatException e)
          JOptionPane.showMessageDialog(null,"cuidado","Error",JOptionPane.ERROR_MESSAGE);
           jTextTime.requestFocus();
       }        What can I do to fix this look and feel problem??
Thanks

When you change the look and feel I think you have to update the Component tree with
SwingUtilities.updateComponentTreeUI(Component c)or the component you changed the look and feel of will have the new look and feel, and some or all of its child components will retain their previous look and feel. I think as of either JDK 5 or 6, the default look and feel is the native one returned by
UIManager.getSystemLookAndFeelClassName()(I'm not completely sure about this) which means until you make the call above, some or all of the child components will have the native look and feel and the component itself will have the cross platform look and feel.
For more information about the Swing architecture, visit Sun's "A Swing Architecture Overview" at:
http://java.sun.com/products/jfc/tsc/articles/architecture/

Similar Messages

  • Hi, in my asus memo pad hd 7 i have some problems whit the videos, they run but whit many stripes in image

    hi, in my asus memo pad hd 7 i have some problems whit the videos, they run but whit many stripes in image.
    what can a i do?
    the firefox is apdated.
    thank you

    Thank you for the update, the fix will be in the release version of Firefox on 2015-02-24.
    In the mean time if you want to continue using Firefox beta our Sync service may be helpful getting your Firefox release data into Firefox beta. https://support.mozilla.org/en-US/kb/how-do-i-set-up-firefox-sync

  • Cr52-A2 problem whit the new firmware(1.80D)

    hello all
    i having a problem whit my cd-rw
    maybe one of you guys can help me cuse i'm breaking my had hear  
    i flashed the firmware from 1.60D to 1.80D
    and my cd-rw stop working  
     the chiki boaster doesn't want me to open him also
     i want the old version  
    give me back my 1.60D
    p.s.
    maybe ther's a way to reset the cd-rw
    ha  
    what are you fox thinking

    Hi
    There is a note at the bottom of the page:
    Note: You should not update your firmware unless you have
    have flash experience with your optical drive.
    But, I will try to download firmware from my girlsfriend's drive. That is the same type. And think that is 160D.
    Tsibi

  • Does anybody know if i buy a new one iphone 4g, it will have problems whit the "antennagate"?

    i want to buy a new one iphone 4g, but i'm afraid that it cames whit the famous antennagate, does any body know if the problem is fixed?

    The question scarcely needs a reply. Tens of millions of iPhones have been sold since that particular media frenzy. Just buy one. Or not. There is a return period and a 12 month warranty if you believe it is suffering from some currently popular malaise.

  • Problems whit the fixed green light

    hi everyone,
    i bought a Airport Express just to configure my printer and my stereo,
    but i started to conigure the AE whit no Internet Conection, after a few tries i manage to configure and after the update i got a fixed green light, but when i try rescan at the Airport Utility i can't find my AE.
    Any ideas to what happened?
    thanks
    Alan

    Temporarily, try connecting an ethernet cable from your computer to the Express to see if that helps AirPort Utility find the Express.
    It may also help to restart both the Express and your computer.

  • I got problem whit the detonator and windows XP (K7T Pro2 Ver:1.0)

    I have windows XP, when i install the drivers for Geforce 2 MX 200 and reboot the machine for frist time I NEVER SEE MY WINDOWS ANYMORE!!!!
    I have:
    MSI K7T pro 2 ver: 1
    512MB SDRAM PC 133
    Sound Blaster PCI 128
    Geforce 2 MX 200 (32MB)
    Amd 1.2 GHz
    Windows XP
    PD: HELP!!!!

    I had similar problems a while back.. the problem was that the refresh rate was to high and it wouldn't go into 60Hz even in safe mode.. I switched the monitor to a newer with PnP and then the driver lowered the refresh rate.. (I had hacked together a own .inf file for the first monitor and it has only BNC so no PNP)

  • I have problem whit the connection to a wifi

    This is important

    Without more information:
    Does the iPod connect to other networks?
    Does the iPod see the network?
    Any error messages?
    Do other devices now connect?
    Did the iPod connect before?
    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on the router
    - Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - iOS: Recommended settings for Wi-Fi routers and access points
    - Restore from backup. See:
    iOS: How to back up
    - Restore to factory settings/new iOS device.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar
    See:
    iOS: Wi-Fi or Bluetooth settings grayed out or dim
    If not successful, an appointment at the Genius Bar of an Apple store is usually in order.
    Apple Retail Store - Genius Bar

  • Problems whit Instant messaging 8.2 and SSL

    Im trying to configure a instant messaging 8.2 whit ssl but when I restart the IM the mux start whitout ssl
    I dont have idea what is the problem whit the configuration and I dont know if Instant messaging 8.2 support ssl
    I use the same cert database that I used for the application server and smtp
    Can I configure ssl only for the Mux and not for the server?
    this is the configuration in the iim.conf for the mux
    iim_mux.usessl=on
    iim_mux.secconfigdir=/opt/sun/comms/im/config (I also tried this parameter whit the value /etc/opt/SUNWiim/default/config but it not work)
    !iim_mux.keydbprefix=https-example.com-www-
    !iim_mux.certdbprefix=https-example.com-www-
    iim_mux.secmodfile=secmod.db
    iim_mux.certnickname=portal.example.com
    iim_mux.keystorepasswordfile=/opt/sun/comms/im/config/sslpassword.conf (I also tried whit the value "sslpassword.conf" )
    Edited by: user9979971 on Jun 30, 2011 9:32 AM

    Instant Messaging 7.3+ no longer supports SSL through the Multiplexor using NSS-based certificates,however you can now migrate the existing certificates from NSS store to JKS using the migratecert utility migratecert.Alternatively you can enable TLS on server which provides end to end encryption
    HTH,
    Swetha

  • Do I have to back up the data of my macbook white unibody if I am changing the screen because of the crack problem at the the back of the screen?

    Do I have to back up the data of my macbook white unibody if I am changing the screen because of the crack problem at the the back of the screen?
    They told me to bring it to the genius at the apple store. They will change it for free but I don't have any physical place to back up my computer, they said it will take a coupe of days. I am not really sure if I have to back it up.
    Thank you.

    gmedina172 wrote:
    Should I use time machine? ...
    Mac 101  Time Machine  >  http://support.apple.com/kb/HT1427
    Time Machine Tutorial  >  Time Machine Tutorial
    Video on Restore From Time Machine
    http://support.apple.com/kb/VI29

  • Can i make the setting and keyboard background black ? , because i have vision problem and the white color is too bright and cause pain and headache for me . thanks

    can i make the setting and keyboard background black ? , because i have vision problem and the white color is too bright and cause pain and headache for me . thanks

    Drmikekuna wrote:
    ... Sony AVCHD .. Canon SD ... Logitech .. Flip Mino HD. ..
    .. Certainly not the best idea for a professional but just fine for a guy who likes to edit for fun.
    that's were the fun stops on a MacOs-based system ..
    FC/e supports only a few 'standards': DV (as from miniDV cams), HDV (from miniDV devices), AVCHD (from most devices) and with a little trick, described on my website AVCHD-light (720p, as from many compact-stills) ..
    done.
    some Flips are supported by iMovie, which you can abuse as a converter tool.
    but 'non video standard' (=read 'video' as 'in TV') formats, resolutions and codecs ...
    a) manual conversion = less convenient
    b) loss of 'quality', e.g. when you blow-up tiny 480x320/15fps into video..
    FC/e is FC/pros lil' brother.. meant for a more.. adult workflow..
    if you like to wrestle with multi-formats, stay with Windows/Magix/..
    Windows=options, with a chance of getting lost
    MacOs=convenience, with a chance of getting restricted

  • I have an IMac running the latest level of Lion.  Since installing Lion and also being forced to replace the hard drive I have a problem with the screen intermittently go all white.  Happens about 8 to 12 times a day.  I am using Wild Blue as my ISP.

    I am looking for anyone in the west Tennessee area using Wild Blue along with Apple IMac who is having a problem with their screen going complelely white every so often.  Have had the maching into the Apple store in Memphis.  They could not get it to fail.  Help

    TutorDaddy, if this Mac is still covered by the initial warranty or under AppleCare, take it in and have it looked at. As the old label used to say, there truly are "no user serviceable parts inside." Kernel panics very usually indicate failing hardware.
    I have an older iBook G4 that started developing kernel panics and like you, despite reinstalling the OS from a freshly formatted volume, they kept continuing. I looked at the crash log and saw that in each instance of panic, the last bit of code to be accessed had something to do with AirPort. Knowing that the AirPort software was at then current levels, I surmised the problem to be a bad AirPort networking card which, on that particular model of the iBook, was a very small module attached directly to the logic board. Since the computer was out of AppleCare, I broke the machine down myself (I didn't realize that there could be so many barely visible screws in one machine) and removed the offending piece of hardware. My iBook lives but without WiFi, it now sits as a more or less desktop machine needing an ethernet connection to stay connected to a network.
    I do not suggest you break into your iMac. First of all, I'm guessing one would need to be able to pull off the glass and have the necessary glue to reattach it, which is not really available to us consumers. If you're feeling adventurous enough to read the crash logs from each panic, you might be able to surmise the hardware component (or badly written application or library; it can happen) that's causing the panic. If it's a software issue, remove the offending software app and see if the panics return. If it's a hardware issue, it's best to let a competent service tech qualified on Apple hardware to handle it.
    [edited to add:]
    After browsing through related problems in the discussions, I saw this link to a third-party web site being handed out. Perhaps you'll find it useful: http://www.thexlab.com/faqs/kernelpanics.html
    Message was edited by: Stephen Adams

  • HT5556 Hi ! I have a problem whit my iTunes card . I scratch the cod but is been of also the number and letter so I can't activate any more that card . Can you help me please to find the good code . Thank you

    Hi ! I have a problem whit my iTunes card . I scratch the cod but is been of also the number and letter so I can't activate any more that card . Can you help me how to fiind the good code  please  Thank you

    Click here and request assistance, supplying as much of the code as you can.
    (74543)

  • I have problem whith the bluetooh whit OS X Mavericks The IMAC don't recognize the bluetooh

    I have problem whith the bluetooh whit OS X Mavericks The IMAC don't recognize the mouse

    Hi Alejofer,
    Thanks for visiting Apple Support Communities.
    You may find the troubleshooting steps in this article helpful with troubleshooting bluetooth on your Mac:
    Bluetooth Quick Assist
    http://support.apple.com/kb/ht1153
    Best,
    Jeremy

  • I have a white ipod touch 4 and it will not go into DFU mode. I know I am doing it right as I have 2 other black ones that I can put into DFU anytime no problems. The ipod works perfect besides that. Can anyone help?

    I have a white ipod touch 4 and it will not go into DFU mode. I know I am doing it right as I have 2 other black ones that I can put into DFU anytime no problems. The ipod works perfect besides that. Can anyone help?

    DFU or Device Firmware Upgrade mode allows all devices to be restored from any state.
    Above from:
    DFU Mode - The iPhone Wiki

  • I udate my os to 10.6.7 and since then my Pages have color problems. The text is not visible (white on white background) it does'nt help to change the text color nor background color. Pls help

    I udate my os to 10.6.7 and since then my Pages have color problems. The text is not visible (white on white background) it does'nt help to change the text color nor background color. I just download the recent trail version of Iworks and install it. The first document I opened it was ok. When I open the second one the problem appear again and stayed. Pls help

    This behavior was described many times.
    In every occurrence,the operating system was an uncompleted one resulting of the use of Software Update to update the operating system to 10.6.2, 10.6.3, 10.6.4, 10.6.5, 10.6.6, 10.6.7.
    In such cases, the solace was to apply a combo updater.
    As you are using 10.6.7, download and apply the combo 10.6.7 :
    http://support.apple.com/kb/DL1361
    After that, run Software Update which will urge you to apply :
    Snow Leopard Font Update
    Yvan KOENIG (VALLAURIS, France) dimanche 29 mai 2011 21:15:58
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

Maybe you are looking for

  • Help needed in selection screen - Urgent

    Hi Experts, I have a selection screen. I have three radi buttons in that selection screen. Based on the selection of the radio buttons I need to activate corresponding selection screen parameters. e.g : if radiobutton1 is selected, njo activation nee

  • Open items displayed in FBL1N but not displayed during vendor payment

    Hi gurus, Does anyone have any idea about this topic? When using FBL1N, I can display all my vendor items, but when I want to pay the vendor with f-53, the system tells me there are no open items, whereas I saw several of them in FBL1N. It does not s

  • How to get the entries in a jar/zip file contained within a jar/zip file?

    If I want to list the jar/zip entries in a jar/zip file contained within a jar/zip file how can I do that? In order to get to the entry enumeration I need a Zip/JarFile: ZipFile zip = new ZipFile("C:/java_dev/Java_dl/java_jdk_commander_v36d.zip"); //

  • HP LaserJet M1132 MFP: unable to save scan to file

    Hi, I just purchased a new HP LaserJet M1132 MFP. Everything is working fine except when using HP Director. It detects the device and scans. But when I try to save the file on my computer it doesn't succeed. Nothing is saved in the folder. What seems

  • We just want back in

    my wife and I were former customers. our daughter decided to get a family plan with another provider and have us switch to that new plan. the new provider gave us credit for our Verizon phones and was going to pay the etf's and life was supposed to b