Error in Option Panel working with FH Look & Feel

17 views
Skip to first unread message

bmv

unread,
Feb 9, 2009, 9:33:35 AM2/9/09
to sql-workbench
Hi,

I was working with some look and feel options and tried used FH Look &
Feel. I had problems working with the laf strait away, had to put some
directories that where inside the jar into same directory of the sql
workbench (this has to be some problem with the laf itself).

Then when i got the laf working i got sick of it and just tried to
apply another one, but i can't access the look and feel options, got
this error message (& stack trace):

ERROR 09.02.2009 14:20:14 OptionPanelPage.getPanel() - Could not
create panel: java.lang.NullPointerException
java.lang.NullPointerException
at java.util.Hashtable.get(Unknown Source)
at java.awt.Component.getFontMetrics(Unknown Source)
at javax.swing.JComponent.getFontMetrics(Unknown Source)
at workbench.gui.settings.LnFOptionsPanel.<init>(LnFOptionsPanel.java:
61)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at workbench.gui.settings.OptionPanelPage.getPanel
(OptionPanelPage.java:61)
at workbench.gui.settings.SettingsPanel.valueChanged
(SettingsPanel.java:95)
at javax.swing.JList.fireSelectionValueChanged(Unknown Source)
at javax.swing.JList$ListSelectionHandler.valueChanged(Unknown
Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown
Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown
Source)
at javax.swing.DefaultListSelectionModel.setValueIsAdjusting(Unknown
Source)
at javax.swing.JList.setValueIsAdjusting(Unknown Source)
at javax.swing.plaf.basic.BasicListUI$Handler.mouseReleased(Unknown
Source)
at java.awt.AWTEventMulticaster.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.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at workbench.gui.settings.SettingsPanel.showSettingsDialog
(SettingsPanel.java:213)
at workbench.gui.actions.OptionsDialogAction$1.run
(OptionsDialogAction.java:47)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)


FH Look & Feel: http://sourceforge.net/projects/fhlaf

Using SQL Workbench/J, Build 103
Java version 1.5.0_15
Windows XP

Thomas Kellerer

unread,
Feb 9, 2009, 9:38:33 AM2/9/09
to sql-workbench
Hi,

I will check this.

As a workaround, you can reset the L&F, by editing workbench.settings
and remove the property

workbench.gui.lookandfeelclass=.....

You can delete the entire line.

SQL Workbench/J will then revert to the System L&F the next time you
start it.

Sorry for the trouble.

Regards
Thomas



On Feb 9, 3:33 pm, bmv <bruno.viei...@gmail.com> wrote:
> Hi,
>
> I was working with some look and feel options and tried used FH Look &
> Feel. I had problems working with the laf strait away, had to put some
> directories that where inside the jar into same directory of the sql
> workbench (this has to be some problem with the laf itself).
>
> Then when i got the laf working i got sick of it and just tried to
> apply another one, but i can't  access the look and feel options, got
> this error message (& stack trace):
>
> ERROR 09.02.2009 14:20:14 OptionPanelPage.getPanel() - Could not
> create panel: java.lang.NullPointerException
> java.lang.NullPointerException
>         at java.util.Hashtable.get(Unknown Source)
>         at java.awt.Component.getFontMetrics(Unknown Source)
>         at javax.swing.JComponent.getFontMetrics(Unknown Source)
>         at workbench.gui.settings.LnFOptionsPanel.<init>(LnFOptionsPanel.java:
>

bmv

unread,
Feb 12, 2009, 5:02:37 AM2/12/09
to sql-workbench
Hi,

New version fixed this problem for the Look and Feel option, but the
same situation occurs in the External Tools option.

Another problem i encountered was that this laf has some problems when
i call the jar, just can't find some folders. then i extracted those
folders into the workbench directory and it worked. i found out what
the problem was because i tried to run sql workbench from the cmd
prompt and saw the exception. What would be really nice was that if
the current look and feel doesn't load correctly sql workbench would
load a default one... what you think?

Thanks for fixing that quick and for the help in the worbench.settings


On Feb 9, 2:38 pm, Thomas Kellerer <google-gro...@sql-workbench.net>
wrote:

Thomas Kellerer

unread,
Feb 12, 2009, 5:50:15 PM2/12/09
to sql-workbench
Hi,

> New version fixed this problem for the Look and Feel option, but the
> same situation occurs in the External Tools option.

OK, I'll check that. It seems that the FH look and feel initialized
the components totally different than all the other L&Fs.

> What would be really nice was that if
> the current look and feel doesn't load correctly sql workbench would
> load a default one... what you think?

That's what I already do. The Problem is that the FH Look and feel
terminates the application when an error occurs, and that is beyond my
control...

Btw: you do realize that the FH Look & Feel is in Beta since about 5
years and has not been updated since then.
Reply all
Reply to author
Forward
0 new messages