public class JalviewAppender extends WriterAppender
{
- // BH 2019 was static
-
- private JTextArea jTextArea = null;
+ static private JTextArea jTextArea = null;
/** Set the target JTextArea for the logging information to appear. */
- public void setTextArea(JTextArea jTextArea)
+ static public void setTextArea(JTextArea jTextArea)
{
- this.jTextArea = jTextArea;
+ JalviewAppender.jTextArea = jTextArea;
}
/**
* Format and then append the loggingEvent to the stored JTextArea.
*/
- @Override
public void append(LoggingEvent loggingEvent)
{
final String message = this.layout.format(loggingEvent);
// Append formatted message to textarea using the Swing Thread.
SwingUtilities.invokeLater(new Runnable()
{
- @Override
public void run()
{
if (jTextArea != null)