Synthetica Simple2D Highlights

DZone 's Guide to

Synthetica Simple2D Highlights

· Java Zone ·
Free Resource

Synthetica V2.8 offers a new theme called Synthetica Simple2D Look and Feel. Below you'll find a short summary of the most important highlights.

  • Drop shadows for popup menus and combobox popups - Synthetica supports drop shadow effect for popupMenus since the first release in 2005. However this new theme also supports drop shadows for combobox popups. 


  • ScrollPanes with rounded corners and inner shadow - The implementation of a rounded border scrollPane is a bit tricky because it affects the scrollBar position. The goal was to avoid an additional gap between the scrollBar position and the border.


  • Translucent scrollbars - Scrollbars are translucent to adopt the view background.


  • Increased table cell insets - Tables look more balanced with increased cell insets.


  • Translucent frameHeader with Java6u10 - Synthetica 2.8 supports a new UI-property called "Synthetica.window.opaque" which can be used to enable window titlePane translucency. By default translucency is disabled - to enable translucency you have to set the value to 'false'.


  • Translucent tooltips - ToolTips are translucent and use real translucency if the UI-property "Synthetica.window.opaque" is set to 'false'.


  • TitledBorder with translucent background fill - To get a more realistic etched effect a titled border additionally modifies the background color of the container.


  • Java 1.5 support - Compared to other Java 2D based themes Synthetica Simple2D also supports Java 1.5. The only thing you have to do is to add the 'syntheticaBatik.jar' file to your classpath. The library is part of the Synthetica download.  
  • New paint cache to improve Java2D performance - Synthetica provides a new paint cache to minimize Java2D calls which results in a better paint performance (up to factor 2).
  • SwingX support is given through SyntheticaAddons 


Tipps for known issues

  • Custom comboBox renderers - Custom comboBox renderers you have to respect opacity to keep the default style. Example:
      combo.setRenderer(new DefaultListCellRenderer(){
        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
          super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
          //avoid painting over comboBox background - a selected list entry has to be opaque
          return this;


  • TitledBorder background - Titled border affects component background. In case that you are using additional containers you have to set opacity of inner containers to false (#setOpaque(false)). 
  • Non-editable textComponents - Sometimes you have to use non-editable text components for i.e. descriptions. In case that you also need to disable painting for such text components you can set the background alpha value to 0 or set the "Synthetica.opaque" client property to false - both methods are equivalent.    






Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}