question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Read-only (non-editable) JTextArea – background color not updated

See original GitHub issue

Not sure if this could be considered a bug as I’m seeing such behavior with at least one other L&F – Nimbus:

text-components

The background color of non-editable text-area doesn’t seem to reflect the actual background color used.

        JTextArea textArea = new JTextArea();
        textArea.getBackground(); // editable background
        textArea.setEditable(false);
        textArea.getBackground(); // non-editable background

Using FlatLaf 0.38.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

0reactions
staniocommented, Aug 26, 2020

Thank you for the extra effort!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change a read only textarea's background color.
I have two text areas that are set to read only after a value is input into them. Is there a way to...
Read more >
Set textbox to readonly and background color to grey in jquery
I would like to make a text box in my jsp to become readonly and its background color to grey like disable in...
Read more >
read-only - CSS: Cascading Style Sheets - MDN Web Docs
The :read-only CSS pseudo-class represents an element (such as input or textarea) ... background-color: white; } textarea:-moz-read-write, ...
Read more >
Background color of non editable textfield - Oracle Communities
Dear all, how can I set the background color with a css stylesheet of a textfield that is enabled but non editable "textfield....
Read more >
Create Read Only JTextField - Java Swing - Java2s.com
To make JTextField read only or non editable use, ... class Main { public void init() { JTextField field = new JTextField("Read Only...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found