|
-
August 20th, 1999, 03:47 AM
#1
MultiPlex Look & Feel
Hi,
I have a problem with the so called MultiPlex L&F. With that technique one can implement
an "auxiliary" L&F which enhances the standard L&Fs.
I first describe you what I did and my problem afterwards.
I've written my own L&F:
//FileChooserLookAndFeel.java
public class FileChooserLookAndFeel extends LookAndFeel {
public UIDefaults getDefaults() {
UIDefaults table = new FileChooserUIDefaults();
Object[] uiDefaults = {
"FileChooserUI", "MultiSelectionFileChooserUI"
};
table.putDefaults(uiDefaults);
return table;
}
...
}
class FileChooserUIDefaults extends UIDefaults {
protected void getUIError(String msg) {
//do nothing
}
}
I've implemented a FileChooserUI:
//MultiSelectionFileChooserUI .java
public class MultiSelectionFileChooserUI extends FileChooserUI {
...
public void installUI(JComponent c) {
...
}
}
and to let Swing know that there is a new L&F, I called:
UIManager.addAuxiliaryLookAndFeel(new FileChooserLookAndFeel());
This works pretty good. The new UI does what it should do.
The problem is, that Swing prints a lot of error messages to StdErr:
java.lang.reflect.InvocationTargetException
Multiplexing LAF: createUI() failed for javax.swing.JPanel ...
Multiplexing LAF: createUI() failed for javax.swing.JScrollPane ...
...
One message for each Component which is used in my app. I think, the MultiLookAndFeel class writes these messages out.
There are no entries in my own UIDefaults for all these components. But I don't want to enhance them all - just the FileChooser.
Is there a way to suppress these messages ?
Thanks, Jan.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|