1) There is a problem with XFree86 that prevents top level accelerators
being installed. I believe this with Metrolink X server with any problem.
Mind you I have the exact same problem on
sparc-sun-solaris-2.5.1-cde-motif1.2-jdk1.1.6-swing-1.1-beta-2
2) I think you can override the installed PLAF (pluggable look and feel)
settings, but it means search through the source code in the
`com.sun.swing.plaf.basic.BasicScrollBarUI' class. I think you must override the
defaults that are loaded in the UIManager properties.
UIManager.put("scroll.bar.foreground", Color.red );
It is stupid that you can't customise externally the components.
Give me X resources any day. Perhaps that how JavaSoft should have coded it.
Maybe it needs a :
public class Resource { String name, Object value }
Resource resources[] = {
{ "troughArea.foreground", Color.red },
{ "troughArea.arrowColour", Color.blue },
}
UIApplicationsResources.registerResources( JScrollBar.getUI().getClass(),
resources );
...
// Read French Canadian property bundle file MyAppBundle_fr_ca.properties
ResourceBundle bundle=ResourceBundle.getBundle( "MyAppBundle" )
UIApplicationsResources.mergeBundle( "MyApplication", bundle )
Something like that. Dreaming ...
______________________________ Reply Separator _________________________________
Subject: Two questions on Swing:
Author: stevecoh ([EMAIL PROTECTED]) at lon-mime
Date: 18/11/98 02:41
Here are two questions I've had on swing. One pertains to java-linux,
the other doesn't, but you guys have been very helpful to me so I
thought I'd ask both.
1) Accessing top level menus via keyboard in Swing. Using Swing 1.0.3
and jdk 1.1.6. I can attach keystrokes to menu items via setMnemonic
and this works. When I attach keystrokes via setMnemonic() to top level
JMenu, however, the keystroke doesn't work, even though the mnemonicized
keystroke does appear in the Menu onscreen. That's under redhat 5.0.
If I take the program and run it on Win95 then the key stroke access
does work. What's going on here?
2) Is there any way to change the colors of the arrow buttons and thumb
in a JScrollBar? I can change everything but that and with the colors
I've chosen, they look really stupid. I realize that this probably
violates the whole look and feel idea which is so prevalent in Swing, but
there ought to be some way to get at these things.