Found the issue. I had this code that was called before building the UI in SwingUtilities.invokeLater
block:
import java.awt.Font;
import java.util.ArrayList;
import java.util.Enumeration;
import javax.swing.UIManager;
...
Font f = new Font(Font.DIALOG, Font.PLAIN, 12);
ArrayList<String> excludes = new ArrayList<String>();
Enumeration itr = UIManager.getDefaults().keys();
while(itr.hasMoreElements()){
Object o = itr.nextElement();
if(o instanceof String) {
String key = (String) o;
Object value = UIManager.get (key);
if ((value instanceof javax.swing.plaf.FontUIResource)
&& (!excludes.contains(key))){
UIManager.put (key, f);
}
}
}
I wanted all UI elements to have uniform Font in my application. When I commented this block, the UI rendering came up as in Java 6. Seems to be a bug in later Java releases.