Submitted On 18-FEB-2008
This is not a threading problem - please take a look at the relevant code lines and simply add a null check.
Submitted On 20-MAR-2008
Test case:
public class SynthArrowButtonTest extends JFrame
{
private static String synthXml = "<synth>" +
" <style id=\"all\">" +
" <font name=\"Verdana\" size=\"12\"/>" +
" </style>" +
" <bind style=\"all\" type=\"REGION\" key=\".*\"/>" +
"</synth>";
public static void main(String[] args)
{
EventQueue.invokeLater(new Runnable(){
public void run()
{
try
{
new SynthArrowButtonTest();
}
catch (Exception e)
{
e.printStackTrace();
}
}
});
}
public SynthArrowButtonTest() throws Exception
{
InputStream is = new ByteArrayInputStream(synthXml.getBytes("UTF8"));
SynthLookAndFeel laf = new SynthLookAndFeel(){
@Override
public void initialize()
{
super.initialize();
StyleFactory styleFactory = new StyleFactory(getStyleFactory());
setStyleFactory(styleFactory);
}
};
laf.load(is, SynthArrowButtonTest.class);
UIManager.setLookAndFeel(laf);
JSpinner sp = new JSpinner();
add(sp);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(new Dimension(400, 300));
setLocationRelativeTo(null);
setVisible(true);
}
public static class StyleFactory extends SynthStyleFactory
{
private SynthStyleFactory synthStyleFactory;
public StyleFactory(SynthStyleFactory synthStyleFactory)
{
this.synthStyleFactory = synthStyleFactory;
}
@Override
public SynthStyle getStyle(JComponent c, Region id)
{
String name = c.getName();
if (id == Region.ARROW_BUTTON && name != null && name.startsWith("Spinner."))
c.getPreferredSize();
return synthStyleFactory.getStyle(c, id);
}
}
}
Submitted On 17-APR-2008
adanecito
Just curious when this will be fixed. It breaks the use of anyone with skins.
Submitted On 22-MAY-2008
Yanic
Still present on 1.6.0_10-beta-b14 and 1.6.0_10-beta-b23.
Please fix this, you're forcing me to disable my custom L&F on whenever my app detects java 6 update 10 - making a good looking java app ugly.
You committed to supporting any custom L&F in Swing, now stick to it.
Submitted On 24-MAY-2008
adanecito
Hopefully this gets fixed in b25?
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|