11.07.2015 Views

JSR-296: The Swing Application Framework - Java

JSR-296: The Swing Application Framework - Java

JSR-296: The Swing Application Framework - Java

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using ResourceMaps: Example# resources/MyForm.propertiesaString = Just a stringaMessage = Hello {0}anInteger = 123aBoolean = TrueanIcon = myIcon.pngaFont = Arial-PLAIN-12colorRGBA = 5, 6, 7, 8color0xRGB = #556677<strong>Application</strong>Context c = <strong>Application</strong>Context.getInstance();ResourceMap r = c.getResourceMap(MyForm.class);r.getString("aMessage", "World") => "Hello World"r.getColor("colorRBGA") => new Color(5, 6, 7, 8)r.getFont("aFont") => new Font("Arial", Font.PLAIN, 12)2007 <strong>Java</strong>One SM Conference | Session TS-3942 | 27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!