Change background of a specific line of JTextArea [duplicate] - java

This question already has answers here:
Highlight one specific row/line in JTextArea
(3 answers)
Closed 8 years ago.
Is there any way to change the background of a specific line of JTextArea?

I found a class that does what I want. Those interested: http://www.camick.com/java/source/LinePainter.java
Thanks.

Related

I am currently working with netbeans and was wondering if there was a way to change the colour of a single character inside a text field? [duplicate]

This question already has answers here:
Different font color in a JTextField
(1 answer)
Making words different colors in JTextField/JTextPane/?
(1 answer)
Closed 6 months ago.
I am currently working with netbeans and was wondering if there was a way to change the colour of a single character inside a text field ? Is there some similar alternative ?

onKeyReleased does not work when a character is typed [duplicate]

This question already has answers here:
How to disable Button when TextField is empty?
(3 answers)
Closed 3 years ago.
I want to disable the button when the text fields are empty.
I have created two fields with the onKeyReleased property
Sorry i sent it unintentionally.
Something like btn.disableProperty().bind(field.textProperty().isEmpty()) should work.
In the future please add a compilable skeleton and what you have tried so far to your question. That makes it way easier to help.
And welcome to stack overflow!

Java Swing checkboxes active [duplicate]

This question already has answers here:
How to add a radio button group in a core java program such that only one radio button is selected at one time?
(3 answers)
Closed 6 years ago.
I have a short question for you.
I have 2 checkboxes and I want to: when is the active one, the other should be off.
Tks in advance!
Please use JRadioButtons, that would fulfill your requirement.

Is there any way block Control-Alt-Delete in java? [duplicate]

This question already has answers here:
Disable the Ctrl-Alt-Delete event through Java program
(4 answers)
Closed 7 years ago.
Is there any way to block the control key in java. I have looked and looked but I have not found any way to do it thanks in advance
There is no way to block CTRL+ALT+DELETE. In any way, shape or form. It is an absolute guarantee against hacking.

Removing lines around button after it's clicked in Swing [duplicate]

This question already has answers here:
Swing: remove focus border from dialogues' buttons
(3 answers)
Closed 9 years ago.
I have a JButton in Java(Swing):
After the click I get this line around the button:
How do I remove these lines?
button.setFocusPainted(false); is the right solution!

Categories

Resources