https://bugs.openjdk.java.net/browse/JDK-8036924
FULL PRODUCT VERSION :
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b129)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b69, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
windows 64bit
EXTRA RELEVANT SYSTEM CONFIGURATION :
Using NetBeans 8
A DESCRIPTION OF THE PROBLEM :
It seems that the background color of a TextArea cannot be controlled. I have tried multiple methods: in a java file with .setStyle, .setBackground; in a css stylesheet (using .textarea, .textArea, .text-area, etc and using the name of my specific TextArea).
I am able to change other properties, like font color. I am able to use the same code and change the TextArea background in Java 7u51.
REGRESSION. Last worked in version 7u51
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
create an TextArea:
TextArea myTA = new TextArea();
myTA.setStyle("-fx-background-fill: black");
or...
in FXML:
<TextArea layoutX="1" layoutY="250" minHeight="120" minWidth="320" editable="false" fx:id="myArea" styleClass="thisIsMine" />
and in the CSS:
#myArea{
-fx-background-color: black;
-fx-text-fill: white;
}
WILL change the text color. WILL NOT change the background. Neither will:
.textarea {...
.myArea {...
.textArea {...
.text-area {...
...etc (I tried many more combinations)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expected a black background in the TextArea
ACTUAL -
TextArea always remains white. Color of font will change as expected.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
no error messages
REPRODUCIBILITY :
This bug can be reproduced always.
FULL PRODUCT VERSION :
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b129)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b69, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
windows 64bit
EXTRA RELEVANT SYSTEM CONFIGURATION :
Using NetBeans 8
A DESCRIPTION OF THE PROBLEM :
It seems that the background color of a TextArea cannot be controlled. I have tried multiple methods: in a java file with .setStyle, .setBackground; in a css stylesheet (using .textarea, .textArea, .text-area, etc and using the name of my specific TextArea).
I am able to change other properties, like font color. I am able to use the same code and change the TextArea background in Java 7u51.
REGRESSION. Last worked in version 7u51
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
create an TextArea:
TextArea myTA = new TextArea();
myTA.setStyle("-fx-background-fill: black");
or...
in FXML:
<TextArea layoutX="1" layoutY="250" minHeight="120" minWidth="320" editable="false" fx:id="myArea" styleClass="thisIsMine" />
and in the CSS:
#myArea{
-fx-background-color: black;
-fx-text-fill: white;
}
WILL change the text color. WILL NOT change the background. Neither will:
.textarea {...
.myArea {...
.textArea {...
.text-area {...
...etc (I tried many more combinations)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expected a black background in the TextArea
ACTUAL -
TextArea always remains white. Color of font will change as expected.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
no error messages
REPRODUCIBILITY :
This bug can be reproduced always.
- relates to
-
JDK-8123399 TextArea.setBackground(Background.EMPTY) still results in a visible background
- Closed