Skip to content

Commit

Permalink
Fixes IDEMPIERE-5673 Wrong character causes java.awt.IllegalComponent…
Browse files Browse the repository at this point in the history
…StateException: This component must have a parent in order to determine its locale on reports (#1785)
  • Loading branch information
CarlosRuiz-globalqss committed Apr 24, 2023
1 parent 274398f commit 5bf9301
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.awt.Container;
import java.awt.Graphics;
import java.awt.IllegalComponentStateException;
import java.awt.Rectangle;
import java.awt.Shape;
import java.io.Externalizable;
Expand Down Expand Up @@ -102,7 +103,11 @@ public HTMLRenderer (ViewFactory f, View v)
m_container = new Container();
m_element = m_view.getElement();
// initially layout to the preferred size
setSize(m_view.getPreferredSpan(X_AXIS), m_view.getPreferredSpan(Y_AXIS));
try {
setSize(m_view.getPreferredSpan(X_AXIS), m_view.getPreferredSpan(Y_AXIS));
} catch (IllegalComponentStateException e) {
if (log.isLoggable(Level.INFO)) log.info("Exception ignored: " + e.toString() + " " + e.getLocalizedMessage());
}
} // HTMLRenderer

private int m_width;
Expand Down

0 comments on commit 5bf9301

Please sign in to comment.