This question already has answers here:
Creating Java dialogs
(5 answers)
Closed 8 years ago.
How would I make a pop up box/A dialog window in Java? For instance say I want to make a window saying "Hello My name is John Smith". How would I do that? Would I have to use swing?
Yes, use Swing by simply using a Swing javax.swing.JOptionPane.
JOptionPane.showMessageDialg(null, "hello world");
Related
This question already has answers here:
How to print color in console using System.out.println?
(15 answers)
Closed 3 years ago.
How do I make this output "Make this a different color", but in red? In Java.
Sorry for stupid question
System.out.println("Make this a different color");
Try this
System.out.println("\033[0;31m Make this a different color");
I think you can't do it in Java if you are printing to the console.
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.
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!!!!
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to change JFrame Icon
I want to put Logo or some icon on the corner of window in my Java desktop application.
How to do that?
Use setIconImage(ImageIcon) for this.