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.
Related
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!
This question already has answers here:
Getting active window information in Java
(3 answers)
Closed 4 years ago.
I'm trying to get the state of a window on Windows. I have to check if the window of word is active or inactive. I don't find any answer to this problem in Google.
Does anyone knows how to do this or if this is possible at all?
Window activeWindow = javax.swing.FocusManager.getCurrentManager().getActiveWindow();
The code above returns always NULL.
Thank you for your answers.
Regards
Roman
Try to use frame.hasFocus() or frame.isFocusOwner()
https://docs.oracle.com/javase/7/docs/api/javax/swing/JFrame.html
This question already has answers here:
JavaFX equivalent of Swing's JSpinner?
(3 answers)
Closed 6 years ago.
With JavaFX, is there any possibility to having Combobox with up/down arrows? like follows,
With this article page 11, under "Mouse and Keyboard Support" section, they have mentioned we can derive such a capability with "JideFX Decoration", but how can I do it?
You could use a Spinner together with a ListSpinnerValueFactory for this purpose.
https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/SpinnerValueFactory.ListSpinnerValueFactory.html
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.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Why is there no isFocused() in GWT?
Hi guys is possible check if a specific object has focus ? My problem in my web app is determine which object has focus when i press tab button, for each focus i need to do a specific action. thx
This is already addressed here - Why is there no isFocused() in GWT?
Please use the stackvoverflow search!!!!