addGBComponent(customCompressLevel, tightPanel, 0, 0, 2, 1, 2, 2, 1, 0, GridBagConstraints.HORIZONTAL, GridBagConstraints.FIRST_LINE_START, new Insets(0,0,0,0));
addGBComponent(compressLevel, tightPanel, 0, 1, 1, 1, 2, 2, 0, 0, GridBagConstraints.NONE, GridBagConstraints.FIRST_LINE_START, new Insets(0,20,0,0));
addGBComponent(compressionLabel, tightPanel, 1, 1, 1, 1, 2, 2, 1, 0, GridBagConstraints.HORIZONTAL, GridBagConstraints.LINE_START, new Insets(0,5,0,0));
- addGBComponent(noJpeg, tightPanel, 0, 2, 2, 1, 2, 2, 1, 0, GridBagConstraints.HORIZONTAL, GridBagConstraints.FIRST_LINE_START, new Insets(0,0,0,0));
+ addGBComponent(noJpeg, tightPanel, 0, 2, 2, 1, 2, 2, 1, 0, GridBagConstraints.HORIZONTAL, GridBagConstraints.FIRST_LINE_START, new Insets(4,0,0,0));
addGBComponent(qualityLevel, tightPanel, 0, 3, 1, 1, 2, 2, 0, 0, GridBagConstraints.NONE, GridBagConstraints.FIRST_LINE_START, new Insets(0,20,0,0));
addGBComponent(qualityLabel, tightPanel, 1, 3, 1, 1, 2, 2, 1, 0, GridBagConstraints.HORIZONTAL, GridBagConstraints.LINE_START, new Insets(0,5,0,0));
UIManager.put("TitledBorder.titleColor",Color.blue);
if (UIManager.getLookAndFeel().getName().equals("Metal")) {
UIManager.put("swing.boldMetal", Boolean.FALSE);
- FontUIResource f = new FontUIResource("SansSerif", Font.PLAIN, 11);
java.util.Enumeration keys = UIManager.getDefaults().keys();
while (keys.hasMoreElements()) {
Object key = keys.nextElement();
Object value = UIManager.get(key);
- if (value instanceof javax.swing.plaf.FontUIResource)
+ if (value instanceof FontUIResource) {
+ String name = ((FontUIResource)value).getName();
+ int style = ((FontUIResource)value).getStyle();
+ int size = ((FontUIResource)value).getSize()-1;
+ FontUIResource f = new FontUIResource(name, style, size);
UIManager.put(key, f);
+ }
}
} else if (UIManager.getLookAndFeel().getName().equals("Nimbus")) {
- FontUIResource f;
- String os = System.getProperty("os.name");
- if (os.startsWith("Windows")) {
- f = new FontUIResource("Verdana", 0, 11);
- } else {
- f = new FontUIResource("DejaVu Sans", 0, 11);
- }
- UIManager.put("TitledBorder.font", f);
+ Font f = UIManager.getFont("TitledBorder.font");
+ String name = f.getName();
+ int style = f.getStyle();
+ int size = f.getSize()-2;
+ FontUIResource r = new FontUIResource(name, style, size);
+ UIManager.put("TitledBorder.font", r);
}
} catch (java.lang.Exception e) {
vlog.info(e.toString());