Added: 2 years ago
From: thenewboston
Views: 78,613
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (132)

Sign In or Sign Up now to post a comment!
  • 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;

  • it is annoying to write like, 5 lines of import when you only need 1 line,

  • to get all of the javax.swing. ...

    just type javax.swing.*;

    It will import everything in javax.swing

  • You COULD go through windows explorer, or just drag and drop the files straight into eclipse...

  • How can you make a button that you can click on and then type something in the button?

  • To find your workspace easily press Alt+Enter in Eclipse and look under Location.

  • VISTA! HIIISsSSsSsSsSsSsSsSsSSsSsSssS­sSsssSssSs

  • Lol, 3:33 "We now have a blank screen, that has a title of the title on the title bar."

  • A title, the title, on the title bar. Yep.

  • just type:

    import java.awt.*;

    import javax.swing.*;

  • @lostsh0t1 haha i did tht lol when i frst watched it. It acceses all liraryes

  • 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 What do you mean you 'made it' .png? You didn't just rename it did you?

  • cool

  • I'm getting an error , can't find symbol class Icon .....

  • hey bucky which software r u using to record thes vdo??//.>>>>>>>>>>

    this is very helpull my dear bucky

  • @shamimshamim1 Hes using an older version of camtasia studio

  • @shamimshamim1

    I believe its 'Camtasia'

    Saw it in one of his videos i believe

  • 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? :)

  • 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.

  • Bucky Plays COD NOoooooo D:

  • I was fine for ALL the tutorials and then bucky says make it into a .png file - BANG! I'm stuck...lol

  • @TheXTaggs download Gimp, edit pic with gimp, klick "save as" and choose png. There you go =)

  • @TheXTaggs go to online-convert . c o m -- just convert your image files to .png, if you cannot make one. good luck.

  • where is source code???

    

  • @upenderneg under "projectname"/src -- where ever you located your workspace.

  • on notepad++ it doesnt work because there is no main method

  • Ya people just wanna make guis but we need to learn the basics b4 creating them

  • i <3 how u say button

  • If you put GUI in the video title this video would have about 3x as many views -.-

  • Comment removed

  • Call of Duty......

  • 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

  • I put the images in the source folder but they didn't show up in eclipse. Help please!!!

  • @FireDominates yea i have that same problem :(

  • @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 You're my hero.

  • @302MineCrafter he/she says to bucky xD

  • I dont see my png files in eclipse

  • @MonkeyGunman

    And I saved the in the src folder in my workspace.

  • I love to listen to these tutorials

  • 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 he says 40 by 40..does he mean 40 pixel by 40 pixel???

  • First when you said "Reg Button" I though that you said "Greg Button"! :D

  • 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?

  • Who else thinks Notch should do a java tutorial series?

  • 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

    

  • wow! first video I ever seen on youtube with 100% likes! way to go bucky!!!!!!

  • 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

  • How do you set the position of the button? I want it to be under some text fields. :(

  • @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 Lol. I solved the problem a while ago. I just used JPanel with FlowLayout as the layout, and just stacked the panels. :wheee:

  • can anyone know how to make a cellphone texting simulator?

  • Yay video with no dislikes! You deserve it ol' greggy!

  • I use neatbeans and i like the built in GUI designer! Much easier & more efficient than writing everything manually.

  • 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 same

  • @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 Hey I was the having the same problem thanks your comment solved it :-)

  • @HiggsBoson82 Thanks you helped me. Tyvm.

  • @HiggsBoson82 thanks bud :D

  • 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 nvm i don't know what fixed it but it did.

  • Comment removed

  • Comment removed

  • 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?

  • 6:50 Transcribe audio

    "so what im gandu is take that custom blend"

    lmao.

  • Wtf I open run it and it opens the window as html WTF WTF???

  • Comment removed

  • Inspirational Video Tutorials Man!

    btw ... the Next YouTube Link after this one is coming up as 55 instead of 63

  • Inspirational Video Tutorials Man!

    btw ... the Next YouTube Link after this one is coming up as 55 instead of 63

  • 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

  • Comment removed

  • Who else looked at the length of the video when he said, "This is your Sixty Second Java tutorial"

    Stupid english language.

  • @caltake1 that was good one! :D

  • getClass is underlined in red and it says that it cannot make a static reference to the non static field???

  • i put them in the src file but they dont show up

  • how can i make a loop or reset to my main class on a button?

  • 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?

  • 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

  • @macboyz1001 OMG THANK YOU... I was having a headache trying to figure this out, my images are finally showing up!

  • CAN I skip the non gui tutorial without having a problem?

    Please answer!

  • 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?

  • 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!

  • 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)

  • Question: Is there a reason for me to not do this

    " import javax.swing*; import java.awt*; "

  • @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.

  • right click on image.* then Validate to work.

  • 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.

  • 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 you need an actionlistener for this.

  • killeroptisu is right  i Refreshrd src and it put picture......

  • can you give me the link of the software(download) you use???

  • @swathyprativadi Please check his second Java Tutorial. Its there...

    (its Eclipse btw, if you're to lazy...)

  • @swathyprativadi

    eclipse.org/

  • can you give me the link of the software(download) you use for java???

  • 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!

  • Does it really take that much more space up to import stuff like:

    javax.swing.*;

    and

    java.awt.*;?

  • @Kainaffets No, import everything

  • @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 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.

  • @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 lol.

  • @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

  • @Kainaffets

    No, but he's just doing this to show what you need to import for each component.

  • @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"

    That fixed my problem.

  • thanks man, this solve my problem with the picture

  • @killer0pitsu I did the same & the pictures showed up

    thanks for Buky and thanks for killer0pitsu

  • why are you importin evry thing 1 by 1 when you can import by whenou can do like this

    import java.awt.*

  • Because you do not want your program to load all classes in the java.awt package ^__^

  • Someone help Pleaseeeeeeeee. I can't add images. Tried placing images in the /src directory. Tried placing them in the bin folder as well.

  • 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.

  • I haven't *.png files, why ???

  • 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

  • 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 :(

  • Comment removed

  • i cant add image to my class i don't know how to go about it pls can you help me out?

  • b.png and x.png images only work for me when they are under "bin" folder, wouldn't work under "src" folder.

  • pretty fu... neeth

    haha :D

  • Nice!

    Great job, Bucky!

  • 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.*;

  • ops lol here to soon !

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more