List of usage examples for javax.swing JTextArea getBackground
@Transient
public Color getBackground()
From source file:org.pentaho.reporting.engine.classic.core.modules.gui.base.parameters.TextAreaParameterComponentTest.java
@Test public void testInitializeErrorFormattedValue() throws Exception { final CountDownLatch latch = new CountDownLatch(1); doReturn("error value").when(updateContext).getParameterValue(ENTRY_NAME); comp.initialize();//from w ww . j av a 2 s . co m SwingUtilities.invokeLater(() -> latch.countDown()); latch.await(100, TimeUnit.MILLISECONDS); JTextArea textArea = findTextArea(comp); assertThat(textArea, is(notNullValue())); assertThat(textArea.getText(), is(equalTo("error value"))); assertThat(textArea.getBackground(), is(equalTo(Color.RED))); assertThat(comp.getBackground(), is(equalTo(ParameterReportControllerPane.ERROR_COLOR))); }