After changing LookAndFeel: Exception:  Colors cannot be null

Hi All!
I've just created a frame and an internal frame. But after I close the internal frame and change the look and feel (for example from windows to windows classic) and reuse of the internal frame I've get the following exception:
Exception in thread "AWT-EventQue-0" java.lang.NullPointerException: Colors cannot be null.
Here's my codes:
package myprojects.probe_1;
import javax.swing.SwingUtilities;
public class Probe_1
  private static JProbeMainFrame frmMain;
  public static void main( String[] args )
    javax.swing.SwingUtilities.invokeLater(
      new Runnable()
        public void run()
          frmMain = new JProbeMainFrame();
          frmMain.setVisible( true );
package myprojects.probe_1;
import java.awt.*;
import java.awt.event.*;
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.ButtonGroup;
import javax.swing.KeyStroke;
import javax.swing.JInternalFrame;
import javax.swing.JDesktopPane;
import javax.swing.UIManager;
import javax.swing.SwingUtilities;
public class JProbeMainFrame extends JFrame
  private JDesktopPane dskDesktop;
  private JCountriesEditor frmCountriesEditor;
  public JProbeMainFrame()
    super( "JProbeMainFrame" );
    int inset = 50;
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    setBounds( inset, inset, screenSize.width - inset * 2, screenSize.height - inset * 2 );
    dskDesktop = new JDesktopPane();
    setContentPane( dskDesktop );
    setJMenuBar( createMainMenuBar() );
    this.addWindowListener(
      new WindowAdapter()
        public void windowClosing( WindowEvent evt )
          JProbeMainFrame.this.closeWindow();
    setLookAndFeelTo( UIManager.getSystemLookAndFeelClassName() );
  // Main menu.
  protected JMenu createFileMenu()
    JMenu mnuMenu;
    JMenuItem mniMenuItem;
    mnuMenu = new JMenu( "File" );
    mnuMenu.setMnemonic( KeyEvent.VK_F );
    mnuMenu.getAccessibleContext().setAccessibleDescription( "Standard file menu." );
    // Items.
    mniMenuItem = new JMenuItem( "Exit", KeyEvent.VK_X );
    mniMenuItem.setAccelerator(
      KeyStroke.getKeyStroke( KeyEvent.VK_X, ActionEvent.ALT_MASK ) );
    mniMenuItem.getAccessibleContext().setAccessibleDescription(
      "Terminates the application." );
    mniMenuItem.addActionListener(
      new ActionListener()
        public void actionPerformed( ActionEvent evt )
          JProbeMainFrame.this.closeWindow();
    mnuMenu.add( mniMenuItem );
    return mnuMenu;
  protected JMenu createSettingsMenu()
    JMenu mnuMenu;
    JMenu smnSubMenu;
    JMenuItem mniMenuItem;
    ButtonGroup rbgRadioButtonGroup;
    JRadioButtonMenuItem rmiRadioMenuItem;
    mnuMenu = new JMenu( "Settings" );
    mnuMenu.setMnemonic( KeyEvent.VK_S );
    mnuMenu.getAccessibleContext().setAccessibleDescription( "Set up how to work the application." );
    // Items.
    mniMenuItem = new JMenuItem( "Countries", KeyEvent.VK_C );
    mniMenuItem.setAccelerator(
      KeyStroke.getKeyStroke( KeyEvent.VK_C, ActionEvent.ALT_MASK ) );
    mniMenuItem.getAccessibleContext().setAccessibleDescription(
      "Maintenance the available countries." );
    mniMenuItem.addActionListener(
      new ActionListener()
        public void actionPerformed( ActionEvent evt )
          if ( frmCountriesEditor != null && frmCountriesEditor.isClosed() )
            // Resue of the internal frame!!!
            dskDesktop.add( frmCountriesEditor );
            frmCountriesEditor.setVisible( true );
          else if ( frmCountriesEditor == null )
            frmCountriesEditor = new JCountriesEditor();
            dskDesktop.add( frmCountriesEditor );
            frmCountriesEditor.setVisible( true );
          if ( frmCountriesEditor.isIcon() )
            try
              frmCountriesEditor.setIcon( false );
            catch ( Exception exc ) { }
          try
            frmCountriesEditor.setSelected( true );
          catch ( Exception exc ) { }
    mnuMenu.add( mniMenuItem );
    mnuMenu.addSeparator();
    smnSubMenu = new JMenu( "Look and Feel" );
    smnSubMenu.setMnemonic( KeyEvent.VK_S );
    smnSubMenu.getAccessibleContext().setAccessibleDescription( "Set the Look and Feel to desired one." );
    rbgRadioButtonGroup = new ButtonGroup();
    UIManager.LookAndFeelInfo[] lafiLookAndFeelInfo = UIManager.getInstalledLookAndFeels();
    String strLookAndFeelName;
    ActionListener alActionListener = new alLookAndFeelActionListener();
    for ( int idxIndex = 0; idxIndex < lafiLookAndFeelInfo.length; idxIndex++ )
      strLookAndFeelName = lafiLookAndFeelInfo[ idxIndex ].getName();
      rmiRadioMenuItem = new JRadioButtonMenuItem( strLookAndFeelName );
      if (UIManager.getSystemLookAndFeelClassName() == lafiLookAndFeelInfo[ idxIndex ].getClassName() )
        rmiRadioMenuItem.setSelected( true );
      rmiRadioMenuItem.getAccessibleContext().setAccessibleDescription(
      "Set the look and feel like " + strLookAndFeelName + "." );
      rmiRadioMenuItem.setActionCommand( lafiLookAndFeelInfo[ idxIndex ].getClassName() );
      rmiRadioMenuItem.addActionListener( alActionListener );
      rbgRadioButtonGroup.add( rmiRadioMenuItem );
      smnSubMenu.add( rmiRadioMenuItem );
    mnuMenu.add( smnSubMenu );
    return mnuMenu;
  protected JMenuBar createMainMenuBar()
    JMenuBar mbrMainMenuBar = new JMenuBar(); // Create menu bar.
    mbrMainMenuBar.add( createFileMenu() );
    mbrMainMenuBar.add( createSettingsMenu() );
    return mbrMainMenuBar;
  private class alLookAndFeelActionListener implements ActionListener
    public void actionPerformed( ActionEvent evt )
      setLookAndFeelTo( evt.getActionCommand() );
  protected void setLookAndFeelTo( String strLookAndFeel )
    try
      UIManager.setLookAndFeel( strLookAndFeel );
      SwingUtilities.updateComponentTreeUI( this );
    catch ( Exception exc ) { }
  protected void closeWindow()
    System.exit( 0 );
package myprojects.probe_1;
import java.awt.event.*;
import java.awt.*;
import javax.swing.JInternalFrame;
public class JCountriesEditor extends JInternalFrame
  public JCountriesEditor()
    super( "JCountriesEditor", true, true, false, true );
    setSize( 200, 400 );
    setLocation( 100, 100 );
}What should I take to avoid the exception or this is a bug in the JSE 1.6.0-beta2-x86 library. Before I forget, running on WinXP SP2 Hun.
Thanks!
Best Regards:
Georgee

For a short bit of informatin: I also tried setting up the Calendar's configured Incoming E-Mail Address in AD as a contact - no difference.

Similar Messages

  • HT201401 After changing the sincard I cannot dile any number and I get a message " call failed " I don't know what is the problem

    The simcard  have been changed twice by the carrier VODAFONE but still the problem exist

    hello flabs, this is likely caused by an outdated extension. in case you have the social fixer addon installed, please update it to the latest version that is available at http://socialfixer.com/blog/category/releasenotes/.

  • Split view for before and after changes?

    One feature I used to use a lot on Lightroom as where it would show a split view showing the image before and after changes (adjustments). I cannot find how to do this in Aperture - is it possible, what is this feature called?
    (and before any smart person tells me to look in help, I'm tired of responses like that. I've looked and didn't find, and that's why I'm asking here. I've tried Compare, and Before and After Changes etc.)

    Unfortunately, no, there is no ability to do the split view like Lightroom has. It's a nice feature.
    The closest you can do is to flip back and forth between two versions. Because when you view the master in aperture it shows the original file without crops and straightening, I suggest that once you crop and straighten, you then create a new version and work on that (this is as close as you can get to LR's "snapshot" functionality). You can then flip back and forth between the two versions to see the changes... but you can't see them side by side with a split.

  • I like the mail feature with one exception; I cannot figure out how to change the font size of incoming mail permanently.  And, when answering an email I have to highlight the first few words and zoom it so I can see what I am writing.  what am I missing?

    I like the mail feature with one exception; I cannot figure out how to change the font size of incoming mail permanently.  And, when answering an email I have to highlight the first few words and zoom it so I can see what I am writing.  what am I missing?

    You can type the email using what you set in preferences and then highlight the text and use command - minus sign (or command - + for larger) to reduce the size of the text.
    You can also type command - T and a window will appear allowing you to select fonts/sizes/color/ background highlight.
    The above works in Notes also. I haven't tried to do this in any other Apple application.
    For incoming emails, you can use the above to reduce font size, but I don't know of a way to permanently set the incoming font size to a default.

  • Downloads used to open after download. NOw they just end up in the download folder and I have to go to the folder to find it and open it. I did not change seettings, maybe an update changed it? I cannot find a way to change this in settings.

    Downloads used to open after download. NOw they just end up in the download folder and I have to go to the folder to find it and open it. I did not change seettings, maybe an update changed it? I cannot find a way to change this in settings.
    == This happened ==
    Every time Firefox opened
    == A week or two ago. Not sure if result of most recent update.

    Downloads used to open after download. NOw they just end up in the download folder and I have to go to the folder to find it and open it. I did not change seettings, maybe an update changed it? I cannot find a way to change this in settings.
    == This happened ==
    Every time Firefox opened
    == A week or two ago. Not sure if result of most recent update.

  • [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)

    Dear Experts,
    i am getting the below error when i was giving * (Star) to view all the items in DB
    [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)
    As i was searching individually it is working fine
    can any one help me how to find this..
    Regards,
    Meghanath.S

    Dear Nithi Anandham,
    i am not having any query while finding all the items in item master data i am giving find mode and in item code i was trying to type *(Star) and enter while typing enter the above issue i was facing..
    Regards,
    Meghanath

  • Error in SQL Query The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query

    hi Experts,
    while running SQL Query i am getting an error as
    The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    T2.LineText
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,T2.LineText
    how to resolve the issue

    Dear Meghanath,
    Please use the following query, Hope your purpose will serve.
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    CAST(T2.LineText as nvarchar (MAX))[LineText]
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,CAST(T2.LineText as nvarchar (MAX))
    Regards,
    Amit

  • How can I change my original security questions? After changing my AppleID and password, I am not given an opportunity to change my security questions, which I cannot remember the answers to, so I cannot purchase any music.

    How can I change my original security questions? After changing my AppleID and password, I am not given an opportunity to change my security questions, which I cannot remember the answers to, so I cannot purchase any music.

    See my User Tip for some help: Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities.
    Send Apple an email request for help at: Apple - Support - iTunes Store - Contact Us
    Call Apple Support in your country: Customer Service: Contacting Apple for support and service

  • Exception: Error decoding message (Key cannot be null)

    Hi guys,
         Coherence 3.3.1/389
         .Net API 3.3.1.2
         I've wrote small invocation task, which collects the info about cluster members, stores it to HashMap and return it as result. This is the code:
         NamedCache cache = CacheFactory.getCache(sCacheName);
         CacheService service = cache.getCacheService();
         Cluster cluster = service.getCluster();
         HashMap res = new HashMap();
         Set members = cluster.getMemberSet();
         Iterator iter = members.iterator();
         while(iter.hasNext())
         Member member = (Member)iter.next();
         res.put((Object)member.getProcessName(), new Integer(member.getPort()));
         As you can see if member.getProcessName() returns null, then null is placed to HashMap.
         When the result was returned to the client, I've got this exception:
         2007-10-04 09:55:45.849 <Error> (thread=Tangosol.Net.Messaging.Impl.ConnectionManager+ConnectionManagerDaemon): Error decoding message
         System.ArgumentNullException: Key cannot be null.
         Parameter name: key
         at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
         at System.Collections.Hashtable.set_Item(Object key, Object value)
         at Tangosol.IO.Pof.PofStreamReader.ReadAsObject(Int32 typeId) in c:\dev\release.net\coherence-net-v3.3\src\Coherence\IO\Pof\PofStreamReader.cs:line 3446
         at Tangosol.IO.Pof.PofStreamReader.ReadObject(Int32 index) in c:\dev\release.net\coherence-net-v3.3\src\Coherence\IO\Pof\PofStreamReader.cs:line 2284
         at Tangosol.Net.Messaging.Impl.Response.ReadExternal(IPofReader reader) in c:\dev\release.net\coherence-net-v3.3\src\Coherence\Net\Messaging\Impl\Response.cs:line 117
         at Tangosol.Net.Messaging.Impl.Codec.Decode(IChannel channel, DataReader reader) in c:\dev\release.net\coherence-net-v3.3\src\Coherence\Net\Messaging\Impl\Codec.cs:line 118
         at Tangosol.Net.Messaging.Impl.Connection.DecodeMessage(DataReader reader) in c:\dev\release.net\coherence-net-v3.3\src\Coherence\Net\Messaging\Impl\Connection.cs:line 874
         I understood why it was happened, but I did not understood why it was masked and my client application was frozen until request time accured (180s).
         Why did you mask it?
         Regards,
         Dmitry.

    Hi
    Thanks for answered.
    I tried to import just 6 lines but the same error.
    Did you know, what could be?
    I am pasting the log.
    TOTAL STEPS  2
    1. Convert Data:         completed  in 1 sec.
    2. Load and Process:     Failed  in 1 sec.
    3. Import:               completed  in 1 sec.
    [Selection]
    FILE=\GrupoPit\FRATECO\DataManager\DataFiles
    41010100001.csv
    TRANSFORMATION=\GrupoPit\FRATECO\DataManager\TransformationFiles
    Frateco.xls
    CLEARDATA= Yes
    RUNLOGIC= Yes
    CHECKLCK= No
    [Messages]
    Convert Data
    Success
    Record Count : 6
    Accept Count : 6
    Reject Count : 0
    Skip Count   : 0
    Key cannot be null.
    Parameter name: key

  • After updating with ios7, I cannot proceed because I cannot enter my password since it uses Greek letters but the keyboard available is Latin. How can I change the keyboard to Greek?

    After updating with ios7, I cannot proceed because I cannot enter my password since it uses Greek letters but the keyboard available is Latin. How can I change the keyboard to Greek?

    try tapping holding on the key that would be most similar to the letter you want to enter, that will bring up a menu of other characters similar to that character and maybe the greek letter will be included in that menu

  • Abrupt change of display-color after sleep

    I POSTED THIS IN THE iMAC DISPLAY-SECTION OF DISCUSSIONS BUT NOBODY REPLIED:
    After I wake up my iMac 27, after it was in sleep-mode
    for some hours, colors look different for less then a second (warmer),
    then it changes to something more cold/bluish. The change is exactly like
    a manual change of the calibration/monitor-profile via settings.
    There is NO blackscreen between the change of the colors,
    like I said: exactly like a monitor-profile-switch.
    I didn't change/add a different profile than the standard yet.
    Is my monitor faulty and/or what's happening with it?
    PS: I can't tell if the "less then a second visible"-profile is superior,
    but i'd like to test it, if possible I installed all the latest updates.
    But amongst them there wasn't that firmware update. Maybe
    cause I CTO'ed the iMac a few weeks ago.

    Haven't experienced this on my i5 iMac, but my monitor is hardware calibrated with a custom profile (first thing I did when I switched it on). I use the ColorMonki device.
    I would recommend you hardware calibrate your monitor and see if the issue re-occurs. If it does contact Apple Tech Support for further advice

  • HT204306 How can I get my old password back after I have changed it? I cannot change it back because it has been used in the last year

    how can I get my old password back  after I have changed it? I cannot change it back because it has been used in the last year

    HI, thanks, but I know I can set a new password. I just wanted to get my old one back cos I have used it a long time & can therefore remember it.

  • RUNTIME EXCEPTION-Cannot cast null to boolean'.

    Hi Friends,
    I have the below mapping.The if condition is satisfied,even though 'then' value is going to the target field.
    When i try to check the queue of the 'IF' function it is throwing error RUNTIME EXCEPTION-Cannot cast null to boolean
                   >splitbyvalue(eachvalue)----> then
                  ->splitbyvalue(eachvalue)>if---->target field
                                     ->mapwithdefault->else
    Please help !!!
    Regards,
    Suresh.

    Hi,
    Thanks for the input!!
    In the below mapping suppose both 'equals' are satisfied then constant value '123' will go to target field otherwise 'else' value will go.
    constant(123)----
                              >concat>splitbyvalue(eachvalue)----
    > then
    E1K1456(source segment)-->\
    equals/
             >and--
    ---equals-\
                                                             concat>splitbyvalue(eachvalue)>if------>target field
    E1K1456(source segment)----
    >\
                                                              source field ->mapwithdefault->else
    Regards,
    Suresh.

  • Photosmart 7510 aio - Colors are wrong after changing Magenta Cartridge

    Hi,
    I have an isue where my 7510 aio printer wont print Yellow and coloer scheme seems all messed up after changing the Magenta Cartridge yesterday.
    All other cartridiges was not changed but for some reason the color cheme of the printer is messed up. I tried another Magenta Cartridge but it still seem strange.
    When I print out a status report the
      - Foto-Color is more brown than black.
      - The Magenta looks ok (Very pink)
      - Cyan is blue / purple looking
      - Yellow is Orange
      - Black is ok black.
    I tried running a clean and adjust but non of that works.
    I tried taking out all cartrigdes and re-inserting them and that wont work either.
    Anybody has an idea of what could be wrong and how I can correct it?
    Thanks
    Jakob

    Hello NikDk, and welcome to the HP Forums, I hope you enjoy your experience!
    I see you're having print quality issues.  I would like to help with that!
    First thing I would suggest, would be a power reset.  Disconnect the power cord from the printer and the power outlet, then wait 60 seconds. After 60 seconds, plug the printer back in. Ensure you plug the printer directly to a wall outlet. Make sure to bypass any sort of surge protector or power bar.
    Second, I would recommend utilizing this document on Fixing Ink Streaks, Faded Prints, and Other Common Print Quality Problems.
    Good luck and please let me know the results of your troubleshooting steps. Thank you for posting on the HP Forums!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • Still cannot change radio caption color by script

    Hello,
    I've been trying to follow advice seen in other threads when developers wanted to inactivate radio button choices by script, and also turn the caption grey. What I'm finding is I can deactivate the choice but I just cannot turn the caption grey.
    If the exclusion group is named "MyRadioChoice" and the choices are (say) "Choice1", "Choice2", "Choice3" and due to other user input Choice3 becomes inapplicable, then the wisdom is this should work:
    MyRadioChoice.Choice3.access = "readOnly";
    MyRadioChoice.Choice3.caption.font.fill.color = "192,192,192";
    The first statement works, the choice can no longer be clicked. But the second does not work, I just can't change the caption color. THe script does not throw any errors, it just plain doesn't work. Can anybody help?

    You were right. That problem was driving me crazy. Thank you for the solution.

Maybe you are looking for

  • Insert a PDF as an icon in another PDF (like in Word)

    Hi, Normally in large proposals that I prepare in MS WORD, I insert PDF attachements as icons. When a reader click in the icon a PDF opens. (attached a related screen shot) Unfortunately when I convert to PDF those "files / icons" are just images.  I

  • Please tell me that I can sort my contacts by "Company,Last Name"

    I just purchased a Treo 650 I depend on being able to sort my Contacts by "Company, Last Name" where is this preference feature on the Treo 650 in Contacts. If this is not possible the Treo becomes useless to me. Please tell me I am missing something

  • Use of pages in SharePoint 2010

    We would like the user to click on a link on main Team Site that will navigate the user to a page. That page will display a lot of content and will have a Content Query Web part that in turn will retrieve many documents from different library. The ob

  • How much data is actually sent to the client?

    Hi, On the web application stuff I'm doing, I have a somewhat complex class structure for my objects. For example: I have a Project class and a Concept class, and technically you can access a Project object's assocated Concept object, but to do so yo

  • Adobe form image display

    How to upload an image on Adobe form and add some condition for image display?