[SOLVED] Unable to find LanguageUpdater for components

Discuss here any questions about the WebLaF library.
Bugs can be posted directly to GitHub issues tracker.

[SOLVED] Unable to find LanguageUpdater for components

Postby frizinator » Mon Jun 30, 2014 11:52 pm

I've been having my program throw a 'Unable to find LanguageUpdater for component:" exception for a couple components. First is the WebColorChooser, and secondly is the WebFileChooser. I don't think I am personally doing something wrong and causing this issue. Any fix or workaround? Below is the exception for the WebFileChooser:

Code: Select all
java.lang.RuntimeException: Unable to find LanguageUpdater for component: com.alee.laf.button.WebButton[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.5,border=com.alee.utils.laf.WeblafBorder@76c472c5,flags=16777504,maximumSize=,minimumSize=,preferredSize=,defaultIcon=jar:file:/C:/Workspace/Java%20workspace/CEditorJClasses/weblaf-complete-1.28.jar!/com/alee/laf/filechooser/icons/backward.png,disabledIcon=,disabledSelectedIcon=,margin=null,paintBorder=false,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=,defaultCapable=true]
   at com.alee.managers.language.LanguageManager.getLanguageUpdater(LanguageManager.java:775)
   at com.alee.managers.language.LanguageManager.updateComponent(LanguageManager.java:868)
   at com.alee.managers.language.LanguageManager.registerComponent(LanguageManager.java:543)
   at com.alee.laf.button.WebButton.setLanguage(WebButton.java:596)
   at com.alee.laf.filechooser.WebFileChooserPanel.createNorthContent(WebFileChooserPanel.java:343)
   at com.alee.laf.filechooser.WebFileChooserPanel.<init>(WebFileChooserPanel.java:299)
   at com.alee.laf.filechooser.WebFileChooserUI.installUI(WebFileChooserUI.java:109)
   at javax.swing.JComponent.setUI(Unknown Source)
   at com.alee.laf.filechooser.WebFileChooser.updateUI(WebFileChooser.java:308)
   at javax.swing.JFileChooser.setup(Unknown Source)
   at javax.swing.JFileChooser.<init>(Unknown Source)
   at javax.swing.JFileChooser.<init>(Unknown Source)
   at com.alee.laf.filechooser.WebFileChooser.<init>(WebFileChooser.java:58)
   at com.hexbit.EditorJ.XF.Listeners.DbxMenuListener.upload(DbxMenuListener.java:76)
   at com.hexbit.EditorJ.XF.Listeners.DbxMenuListener.actionPerformed(DbxMenuListener.java:64)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.AbstractButton.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$200(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue$4.run(Unknown Source)
   at java.awt.EventQueue$4.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
frizinator
 
Posts: 12
Joined: Fri Dec 07, 2012 8:14 am

Re: Unable to find LanguageUpdater for components

Postby mgarin » Wed Jul 02, 2014 2:52 pm

This error might appear only if you are using WebLaF components without initializing the WebLaF as L&F or at least initializing WebLaF managers required for the components to work.

Here is the example that throws that exception:
Code: Select all
public class AsyncTreeModel
{
    public static void main ( String[] args )
    {
        WebFileChooser.showOpenDialog ();
    }
}


And here are the examples which doesn't:
Code: Select all
public class AsyncTreeModel
{
    public static void main ( String[] args )
    {
        WebLookAndFeel.install ();
        WebFileChooser.showOpenDialog ();
    }
}

Code: Select all
public class AsyncTreeModel
{
    public static void main ( String[] args )
    {
        WebLookAndFeel.initializeManagers ();
        WebFileChooser.showOpenDialog ();
    }
}


So basically - you need to either install WebLaF as application L&F or initialize its managers separately.
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg

Re: Unable to find LanguageUpdater for components

Postby mgarin » Wed Jul 02, 2014 2:54 pm

User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg

Re: Unable to find LanguageUpdater for components

Postby frizinator » Thu Jul 03, 2014 3:48 am

Oh okay! Thank-you much. That definitely fixes the issues for the components I was trying to use.
frizinator
 
Posts: 12
Joined: Fri Dec 07, 2012 8:14 am

Re: [SOLVED] Unable to find LanguageUpdater for components

Postby mgarin » Thu Jul 03, 2014 10:14 am

Glad that helped :)
Marking solved.
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg


Return to Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron