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!!!!
Related
This question already has answers here:
Unfortunately MyApp has stopped. How can I solve this?
(23 answers)
Closed 2 years ago.
I use two edit fields and get their texts in on lick method of a button, but when i click button my app crashed. please help me to resolve this problem.
I am fresh one here, if I make any mistake in uploading my question ignore it
thanks..!
Text Field returns a string, which can be a non-number string.
A try-catch block would help if the method could not parse it into an integer.
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:
Disable JButton focus border
(5 answers)
Closed 4 years ago.
i'm new there. My first issue:
When i start my GUI java swing application in Window Builder, first object is always selected
and when i click anything (button or anything) it's show like it's clicked and i don't want it to show. What command for this?
You should use this:
button.setFocusPainted(false);
java, swing, awt, remove focus from all objects
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.