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.
Related
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:
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");
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!
This question already has answers here:
Disable JFrame when a new JFrame is opened
(2 answers)
Closed 10 years ago.
I was wondering if it was possible to disable all other action when a JFrame is opened in Java.
Just like this?
Is there easy code for this?
This has been asked many times and the answer is always the same: use a modal JDialog or JOptionPane (which is a version of a modal JDialog), not another JFrame.
For example, please check out mKorbel's answer here.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Nice looking progress bar in java
I use setBackground and setForeground to set the color of a JProgressBar but they didn't work, the color remain Orange. I can't change it.
It's likely due to your installed look-and-feel. Does this help: change-colors-for-jprogressbar-with-nimbus