There is a problem when I try to put a picture into the source. I did exactly as he did, but the picture won't show. I made it .png, I put it in the source and I even named the pictures the same as his. Someone please help.
Both .jpg and .png worked for me...What I had to do was get the file on the Package Explorer like at 6:27. Right click "src" and click refresh after you save to file.
Hehe im 14 I don't have any classes in this but I already am following all kinds of tutorials from my 12th and I can say easily even a child can follow this! UR GREAT BUCKY!!!!!
when I add a button to my JFrame it just takes up the entire screen no matter how big I make it, I even tried the setSize and it did not do anything... help please?
@Bassdoken1 first you need to setLayout(null) so it doesn't allocate jbuttons automatically. then you apply a method to your Jbutton called setLocation(int x,int y) where x and y are the coordinates.
btw nice tutorial, you have a very comprehensive expression skill.
my PNG files don't show up. Why? I put them in the right folder but when I try to run the program it says it can't find the resource. I even added the path on where it is just in case SAME error. What is wrong?
im having a hard time with the pictures i dont really know how to change to 40 x 40 and i tried saving where you said and it dosnt show up when i open eclipes
hi.... i'm not getting my images in the eclipse package explorer(on the left side of the main window of eclipse wher all the saved files are displayed).. i followed all the steps mentioned in this tutorial.. how do i get 'em thr.. can u think of any obvious mistakes tht i mite hav made??
you can always just copy you image files (.png, .jpg ...), click right click on src on the eclipse application where it shows you your files and folders, and paste it. Anyway, great video
@macboyz1001 yh that seems to work for me because for some strange reason it wouldnt detect it by me just putting the files in there or restarting it i had to copy it while in the editor :D
Can you do show how to make this ONE file. With the gui and main file together. I'm not sure where to put the other class. Does it go first and the rest of the classes go within it or ? Does it make a difference the order? Just not sure if the other classes are within the main class or not.
OMG! Finally got the custom button to work. At first the pics would not even show being on the workspace in Eclipse, but would show in my computer files as being there? I had to go to the menu (down arrow on left under navigator, project explorer or package explorer) open filters or customized view and make sure that file extension was not blocked. I just took all the filters off with deselect all under the package explorer. I had to also edit the pictures to close to 40x40. finally worked!
@MrMelonBread Performance. It's quicker to import specific libraries instead of importing them all. That's why languages like Visual Basic are slower, because they import everything at once instead of just the things it needs.
@Kainaffets I do think it matters, however the best practice is to not use .* and actually specify the class you want. Makes the software more efficient.
@Kainaffets not in small programs, but trust me, when you are developing bigger projects you will see the difference. but as @12stringovation said the best practice is not to include all libraries at once.
@Kainaffets Not if the compiler corrects this mistake ;) Which it does. In most cases it looks into the packages and only imports the ones really used.
@Kainaffets it depends on the package, some of them contain tons of stuff that is unnecessary for you.... Space isn't the only reason to stay away from wild cards though, believe it or not it's easier to read someone elses code when they import everything individually. Plus, I've had several employers mention that they immediately disregard applications when wild cards are used in sample work.
@Kainaffets sometimes you need to give the exact package you want imported or the programm won't run.. Dunno why this happens but it does.. I can/will pm you if you want specifics. (btw I'm writing an exam today on Java and I'll just use * and hope for the best)
@Kainaffets No but it's standard coding practice so that anyone looking at your code knows what classes you're using, and not just the package being used.
After 3th try in 3am i figured it out how to add the pictures.. Just put them into ur src folder like Mr Awsome showed And then after that go to Eclipse--right click on the src folder(where u make ur class and suchs) and Select "Refresh"
how do you change the button size? it warps to the size of the first icon but if the rollover icon is bigger than the first icon, then it wont show the whole picture
get it :
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
devilazpl 2 days ago
it is annoying to write like, 5 lines of import when you only need 1 line,
Unon1100 2 weeks ago in playlist Java Programming Tutorials
to get all of the javax.swing. ...
just type javax.swing.*;
It will import everything in javax.swing
Unon1100 2 weeks ago in playlist Java Programming Tutorials
You COULD go through windows explorer, or just drag and drop the files straight into eclipse...
MineCrafterBrad 1 month ago
How can you make a button that you can click on and then type something in the button?
candyman6898 1 month ago
To find your workspace easily press Alt+Enter in Eclipse and look under Location.
o0Richard 1 month ago
VISTA! HIIISsSSsSsSsSsSsSsSsSSsSsSssSsSsssSssSs
SurgeDungeon 1 month ago
Lol, 3:33 "We now have a blank screen, that has a title of the title on the title bar."
MinecraftCreators 2 months ago in playlist Java Programming Tutorials
A title, the title, on the title bar. Yep.
rulla101 3 months ago in playlist Java Programming Tutorials
just type:
import java.awt.*;
import javax.swing.*;
lostsh0t1 3 months ago 4
@lostsh0t1 haha i did tht lol when i frst watched it. It acceses all liraryes
toy741life 2 months ago
There is a problem when I try to put a picture into the source. I did exactly as he did, but the picture won't show. I made it .png, I put it in the source and I even named the pictures the same as his. Someone please help.
TheNickMead 3 months ago
@TheNickMead What do you mean you 'made it' .png? You didn't just rename it did you?
TheBenPicko 3 months ago
cool
roxadi 3 months ago
I'm getting an error , can't find symbol class Icon .....
weazzy89 4 months ago
hey bucky which software r u using to record thes vdo??//.>>>>>>>>>>
this is very helpull my dear bucky
shamimshamim1 4 months ago in playlist Java Programming Tutorials
@shamimshamim1 Hes using an older version of camtasia studio
Grymic 3 months ago
@shamimshamim1
I believe its 'Camtasia'
Saw it in one of his videos i believe
yourock129 3 months ago in playlist Java Programming Tutorials
does anyone know how to use images from the built in resources library in java, rather than an external picture that you import into your project? :)
retromelon123 4 months ago
Both .jpg and .png worked for me...What I had to do was get the file on the Package Explorer like at 6:27. Right click "src" and click refresh after you save to file.
fbakersj 4 months ago
Bucky Plays COD NOoooooo D:
DazKins 4 months ago
I was fine for ALL the tutorials and then bucky says make it into a .png file - BANG! I'm stuck...lol
TheXTaggs 5 months ago
@TheXTaggs download Gimp, edit pic with gimp, klick "save as" and choose png. There you go =)
shammerHammer 5 months ago in playlist Bucky's Java Tutorial
@TheXTaggs go to online-convert . c o m -- just convert your image files to .png, if you cannot make one. good luck.
vobbit 4 months ago
where is source code???
upenderneg 5 months ago
@upenderneg under "projectname"/src -- where ever you located your workspace.
Wilson1592 4 months ago
on notepad++ it doesnt work because there is no main method
AlphaCowRules64 5 months ago
Ya people just wanna make guis but we need to learn the basics b4 creating them
dtgonzalez1 5 months ago
i <3 how u say button
LAlba93 5 months ago
If you put GUI in the video title this video would have about 3x as many views -.-
zerohourkevin 6 months ago
This has been flagged as spam show
copy paste:
import java.awt.FlowLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
SatanFlaskanOchJag 6 months ago
Comment removed
SatanFlaskanOchJag 6 months ago
Call of Duty......
houximing 6 months ago
ey bucky, i would love to email u, my email address is romeomeo@2009@live.com
please send me something so that we can talk, i'm your ticket to fame. this SHIT IS TIGHT
9503175706088 6 months ago
I put the images in the source folder but they didn't show up in eclipse. Help please!!!
FireDominates 6 months ago 2
@FireDominates yea i have that same problem :(
Ninjason1337 6 months ago in playlist Beginner Java Tutorials
@FireDominates got it this is what i did:
1) copy & paste images into src folder
2) exit src folder
3) go int Eclipse>File>Refresh
Hope that helps :)
Ninjason1337 6 months ago 15
@Ninjason1337 You're my hero.
302MineCrafter 2 months ago
@302MineCrafter he/she says to bucky xD
Noddy704 2 months ago
I dont see my png files in eclipse
MonkeyGunman 7 months ago 2
@MonkeyGunman
And I saved the in the src folder in my workspace.
MonkeyGunman 7 months ago
I love to listen to these tutorials
yidong20101 7 months ago
Hehe im 14 I don't have any classes in this but I already am following all kinds of tutorials from my 12th and I can say easily even a child can follow this! UR GREAT BUCKY!!!!!
MacProgrammar 7 months ago
when he says 40 by 40..does he mean 40 pixel by 40 pixel???
vipulbhojwani 7 months ago
This has been flagged as spam show
First when you said "Reg Button" I though that you said "Greg's Button"! :D
Alerhau 7 months ago
First when you said "Reg Button" I though that you said "Greg Button"! :D
Alerhau 7 months ago
when I add a button to my JFrame it just takes up the entire screen no matter how big I make it, I even tried the setSize and it did not do anything... help please?
DreadKyller 8 months ago
Who else thinks Notch should do a java tutorial series?
AJspartan 8 months ago
hey bucky I am not able to see my pictures when I open eclipse
they are png and 40 by 40 , and still do not work
14fdasso 9 months ago
wow! first video I ever seen on youtube with 100% likes! way to go bucky!!!!!!
Mrjameslat 9 months ago
I don't know if this is an update, but since this tutorial you could just drag the photo over src and it automatically puts it in
Khoaster 9 months ago
How do you set the position of the button? I want it to be under some text fields. :(
Bassdoken1 10 months ago
@Bassdoken1 first you need to setLayout(null) so it doesn't allocate jbuttons automatically. then you apply a method to your Jbutton called setLocation(int x,int y) where x and y are the coordinates.
btw nice tutorial, you have a very comprehensive expression skill.
Valem0r 9 months ago
@Valem0r Lol. I solved the problem a while ago. I just used JPanel with FlowLayout as the layout, and just stacked the panels. :wheee:
Bassdoken1 9 months ago
This has been flagged as spam show
0 Dislikes ?
If this post (1 you're reading now) doesn't get 10 thumbs up in the next week, I'm gonna dislike this video, buahahahaha
ya6655 10 months ago
can anyone know how to make a cellphone texting simulator?
excuse98 10 months ago
Yay video with no dislikes! You deserve it ol' greggy!
TheFlamingFetus 10 months ago
I use neatbeans and i like the built in GUI designer! Much easier & more efficient than writing everything manually.
mihek 11 months ago
My files won't show up for some reason
i put them in the source file
then i close eclipse and i open it again and they aren't here
WHY?
oliball123 11 months ago 2
@oliball123 same
TheMacManPro 10 months ago
@TheMacManPro
Try this.in eclipse, go File and then press Refresh.(or F5 after select the project folder in "Package Explorer"
Hopefully u will can see whatever icon u have in ur src.
greetings
HiggsBoson82 10 months ago 6
@HiggsBoson82 Hey I was the having the same problem thanks your comment solved it :-)
Aleksandrme 9 months ago
@HiggsBoson82 Thanks you helped me. Tyvm.
BloomingBallon 8 months ago
@HiggsBoson82 thanks bud :D
Ninjason1337 6 months ago
my PNG files don't show up. Why? I put them in the right folder but when I try to run the program it says it can't find the resource. I even added the path on where it is just in case SAME error. What is wrong?
MrJoshiemoto 11 months ago
@MrJoshiemoto nvm i don't know what fixed it but it did.
MrJoshiemoto 11 months ago
Comment removed
HiggsBoson82 10 months ago
Comment removed
HiggsBoson82 10 months ago
I need a little help. I put my png images into my project src folder, but I cannot see them when I working with Eclipse. What's wrong?
ShiningKera 11 months ago
6:50 Transcribe audio
"so what im gandu is take that custom blend"
lmao.
awesomeflame 11 months ago
Wtf I open run it and it opens the window as html WTF WTF???
TheWinFailure 1 year ago
Comment removed
legokidnaruto 1 year ago
Inspirational Video Tutorials Man!
btw ... the Next YouTube Link after this one is coming up as 55 instead of 63
Auzzieplague 1 year ago
Inspirational Video Tutorials Man!
btw ... the Next YouTube Link after this one is coming up as 55 instead of 63
Auzzieplague 1 year ago
im having a hard time with the pictures i dont really know how to change to 40 x 40 and i tried saving where you said and it dosnt show up when i open eclipes
superhappyfunlandman 1 year ago
This has been flagged as spam show
hi.... i'm not getting my images in the eclipse package explorer(on the left side of the main window of eclipse wher all the saved files are displayed).. i followed all the steps mentioned in this tutorial.. how do i get 'em thr.. can u think of any obvious mistakes tht i mite hav made??
sammy3147 1 year ago
Comment removed
sammy3147 1 year ago
Who else looked at the length of the video when he said, "This is your Sixty Second Java tutorial"
Stupid english language.
caltake1 1 year ago 2
@caltake1 that was good one! :D
paziipa 1 year ago
getClass is underlined in red and it says that it cannot make a static reference to the non static field???
IYIySTiiKv1 1 year ago
i put them in the src file but they dont show up
ki11akd0g 1 year ago
how can i make a loop or reset to my main class on a button?
vash18sd 1 year ago
im sorry bucky but when u created the images do you have to restart eclipse for it to show up and when u say 40x40 is that cm or pixels?
0528203 1 year ago
you can always just copy you image files (.png, .jpg ...), click right click on src on the eclipse application where it shows you your files and folders, and paste it. Anyway, great video
macboyz1001 1 year ago
@macboyz1001 yh that seems to work for me because for some strange reason it wouldnt detect it by me just putting the files in there or restarting it i had to copy it while in the editor :D
0528203 1 year ago
@macboyz1001 OMG THANK YOU... I was having a headache trying to figure this out, my images are finally showing up!
lakers34kb 1 year ago
CAN I skip the non gui tutorial without having a problem?
Please answer!
vancar6 1 year ago
GUYS, im in need of desperate help here, i accidently minimized or deleted the library thing on the side which he is talking about at 4:05
how do i get it back?
ro33han 1 year ago
Can you do show how to make this ONE file. With the gui and main file together. I'm not sure where to put the other class. Does it go first and the rest of the classes go within it or ? Does it make a difference the order? Just not sure if the other classes are within the main class or not.
djlovedreamer 1 year ago
OMG! Finally got the custom button to work. At first the pics would not even show being on the workspace in Eclipse, but would show in my computer files as being there? I had to go to the menu (down arrow on left under navigator, project explorer or package explorer) open filters or customized view and make sure that file extension was not blocked. I just took all the filters off with deselect all under the package explorer. I had to also edit the pictures to close to 40x40. finally worked!
djlovedreamer 1 year ago
HA! jpg works on my pc... ah**sigh***! the joy of of linux computing.
(btw, i'm no better, the computer came preloaded with a windows OS :D)
haudace 1 year ago
Question: Is there a reason for me to not do this
" import javax.swing*; import java.awt*; "
MrMelonBread 1 year ago
@MrMelonBread Performance. It's quicker to import specific libraries instead of importing them all. That's why languages like Visual Basic are slower, because they import everything at once instead of just the things it needs.
thedoodemiester 1 year ago
right click on image.* then Validate to work.
bmbadea 1 year ago
Seen like 15 of your videos today! You are the first guy I have found that appears to have perfect knowledge of what people are looking fore. =)
Thank you for the awesomeness.
marcusrehn 1 year ago
Is it possible to create buttons with dynamic text in it? Eg. When I click on the button with text "Hi", the text on the button changes to "bye" .
raffe2k 1 year ago
@raffe2k you need an actionlistener for this.
xrtze 1 year ago
killeroptisu is right i Refreshrd src and it put picture......
velidar1 1 year ago
can you give me the link of the software(download) you use???
swathyprativadi 1 year ago
@swathyprativadi Please check his second Java Tutorial. Its there...
(its Eclipse btw, if you're to lazy...)
Pizmovc 1 year ago
@swathyprativadi
eclipse.org/
kimpen00 1 year ago
can you give me the link of the software(download) you use for java???
swathyprativadi 1 year ago
GOD I LOVE THE INTERNET...
Thank you for this!!
I'm taking online java classes from total scratch and sometimes I'm struggling, and your videos are WONDERFUL!
Obsessa 1 year ago 56
Does it really take that much more space up to import stuff like:
javax.swing.*;
and
java.awt.*;?
Kainaffets 1 year ago 47
@Kainaffets No, import everything
chubbystudios 1 year ago
@Kainaffets I do think it matters, however the best practice is to not use .* and actually specify the class you want. Makes the software more efficient.
12stringovation 1 year ago
@Kainaffets not in small programs, but trust me, when you are developing bigger projects you will see the difference. but as @12stringovation said the best practice is not to include all libraries at once.
AsibTayeb 1 year ago
@Kainaffets Not if the compiler corrects this mistake ;) Which it does. In most cases it looks into the packages and only imports the ones really used.
88Cortex 1 year ago
@Kainaffets well there's a lot of things in those packages so if you import it all your program will take a lot longer to import.
hihaatje 1 year ago
@Kainaffets it depends on the package, some of them contain tons of stuff that is unnecessary for you.... Space isn't the only reason to stay away from wild cards though, believe it or not it's easier to read someone elses code when they import everything individually. Plus, I've had several employers mention that they immediately disregard applications when wild cards are used in sample work.
bfree456 1 year ago
@Kainaffets lol.
tutorialconr 8 months ago
@Kainaffets sometimes you need to give the exact package you want imported or the programm won't run.. Dunno why this happens but it does.. I can/will pm you if you want specifics. (btw I'm writing an exam today on Java and I'll just use * and hope for the best)
:D
Sogoku8 7 months ago
@Kainaffets
No, but he's just doing this to show what you need to import for each component.
JTaranus 5 months ago in playlist Java Programming Tutorials 2
@Kainaffets No but it's standard coding practice so that anyone looking at your code knows what classes you're using, and not just the package being used.
Wilson1592 4 months ago
After 3th try in 3am i figured it out how to add the pictures.. Just put them into ur src folder like Mr Awsome showed And then after that go to Eclipse--right click on the src folder(where u make ur class and suchs) and Select "Refresh"
That fixed my problem.
killer0pitsu 2 years ago 4
thanks man, this solve my problem with the picture
hoyun 2 years ago
@killer0pitsu I did the same & the pictures showed up
thanks for Buky and thanks for killer0pitsu
bargalshmal 1 year ago
why are you importin evry thing 1 by 1 when you can import by whenou can do like this
import java.awt.*
victorn96 2 years ago
Because you do not want your program to load all classes in the java.awt package ^__^
mikesca1980 2 years ago
Someone help Pleaseeeeeeeee. I can't add images. Tried placing images in the /src directory. Tried placing them in the bin folder as well.
sanjayapps 2 years ago
You have to put them in the "package name" directory, where you have the classes*.java files.
Excuse me for my english, i'm italian.
iscritto467 2 years ago
I haven't *.png files, why ???
iscritto467 2 years ago
how do you change the button size? it warps to the size of the first icon but if the rollover icon is bigger than the first icon, then it wont show the whole picture
unnamed345 2 years ago
I can't get the images to show up in my files list. I tried putting them in the project directory and the src directory :(
DontFretBrett 2 years ago
Comment removed
itsbrad212 2 years ago
i cant add image to my class i don't know how to go about it pls can you help me out?
emmas4impact 2 years ago
b.png and x.png images only work for me when they are under "bin" folder, wouldn't work under "src" folder.
ikaterpillar 2 years ago
pretty fu... neeth
haha :D
YourAppleTechHelp 2 years ago
Nice!
Great job, Bucky!
68kaspar 2 years ago
I'm not sure if you mentioned before this but to save yourself some time, you could just write:
import java.awt.*;
import java.swing.*;
iceboarderz 2 years ago
ops lol here to soon !
salsabil18 2 years ago