It does not work for me. I typed the exact same thing yet he is bitching abt .setIcon and I have no clue how to fix it. I would apricate it if you could help me
It doesnt work!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I have all Images in the same folder as the calss, when i want to start the programm in eclipse it says: Errors in Workspace i press proceed and the images show, but if i want to export it as a runnable jar file it doesnt start!!!!!!!! So ye, it doesnt work!
Thank you, it works 🙂
But i dosent used "validate();"
how can I change the size and scale of the button ?
can u show me how to bring this button to wherever we like after adding the image
it can t work
i might be wrong but this is a swing thing and doesn't work with Javafx or at-least inst compatible with what im doing
Thanks!
Click button and display image on label tutorial please
Good tutorial, thanks!
Whats the difference between C: and E: ?
it doesnt work ..can any suggestions?
import java.awt.Dimension;
import javax.swing.*;
public class Test extends JFrame {
JPanel jp = new JPanel();
JButton jb = new JButton();
public Test() {
setSize(700,800);
setTitle("Unicode image");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jb.setIcon(new ImageIcon("C:\unicodeimg\download.png"));
jp.add(jb);
add(jp);
validate();
}
public static void main(String[]srgs){
Test x = new Test ();
x.setVisible(true);
}}
speed 1.5 is the normal speed for this vid
thanks alot!!!!
never knew that it was so damn simple!!!!!!!!!!!!!!!!!!!!!!!!!
Thank you man!!!
Wouldn’t it be easier to copy the image you want into the java project then you would only have to type
jb.setIcon(new ImageIcon(“BGLogo.png”);
instead of the entire file location?
It does not work for me.
I typed the exact same thing yet he is bitching abt .setIcon and I have no clue how to fix it.
I would apricate it if you could help me
It doesnt work!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I have all Images in the same folder as the calss, when i want to start the programm in eclipse it says: Errors in Workspace
i press proceed and the images show, but if i want to export it as a runnable jar file it doesnt start!!!!!!!!
So ye, it doesnt work!
Well,
thank you!!
thx man
It's simple that it worked coz he just showed you him doing it it don't work 4 u you have gone wrong
Nice tutorial but it doesn't work at all.
If you can't achieve this than you're definatley not experienced.
Hey thanx for the video. I struggle the change the size of the image so that it will fill the button. Help please?
x4HxDeath I tried this exactly 32 times and it still didn't work – and I am a minecraft modder so I have had a lot of experience with Java.
I tried this a thousand times word for word and it doesn't work. WHY!?!?!?!?!?!?!?!