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

Link to this comment:

Share to:

All Comments (40)

Sign In or Sign Up now to post a comment!
  • its better do GUI on Visual Basic, then after make ur program on java and when the VB GUI is on, ur program starts to run.

    Guy: Why use VB?

    Couse he have a more easy interface, so, its better for "noobs" in Java.

    Guy: But isnt that why bucky is here?

    Yup but thats just a suggestion ;D

  • @jeanmon357 But in visual basic you program in BASIC, not java, so how does that help??

  • Quick question, I thought static doesn't denote something that can't change. So instead of private static [] fileName, could you use public static final [] fileName ? (Can anybody explain his reasoning?, since I thought final was used to denote that it can't change).

  • private Icon[] pics = {new ImageIcon(getClass().getResour­ce(filename[0])), new ImageIcon(getClass().getResour­ce(filename[1]))};

  • i cant see what uve written, i cant get it to work, ive tried the braces but itsays its wrong

  • @britishgoose01 You can''t see what hes written? Are you blind or something :L

  • @britishgoose01 Have you fixed it yet, I still am not able to fix it it's fucking annoying.

  • your perfect ;)

  • Hey, Bucky how do you make a variable change after you pick a option in the Combo Box? 'Cause I don't know how to that exactly. Thanks if you could answer me.

  • lol the way you pronounce picture is really funny

  • @oliball123 He says it like pitchers! ;) Very funny!

  • Theres kinda a problem, when he said "lets make it static so it cant change" he was wrong, static is just something to make the variable accessable by other classes as a constant (i think) but to make it not changeable you need to use final :P

  • @MrBlockersPro Static does mean it doesn't change dude. when your talking about 'accessibility' thats the public or private code parts.

  • @mouzsport Static can change, it's just shared by all members (or instances) of a class. It's FINAL that doesn't change (but you posted this 9 months ago so you probably know now any way) :)

  • I didnt really understand why we made it static

  • @DawnOfDemise why not? we werent going to change the values of it anyway

  • This is so cool.

  • I'm getting an error. I'm running on a Mac, and the pictures weren't showing up on the left sidebar src thing, so I copied them to there, but now it's saying:

    Multiple markers at this line

    " - Cannot make a static reference to the non-static method getClass() from the type Object - b cannot be resolved to a variable"

    for the error. I think it's not able to get the resource because copying it is only a copy. Any ideas?

  • @Mewigi You dummy head. Stop trying to be smart. I had the Icon[] array set as static. Maybe I should actually listen to when the pop up thingy says "static" and "non-static".

  • @Mewigi Try putting the pictures in the bin folder with the classes

  • @Mewigi put pics in bin

  • @Alavistaven2012 You're 9 months late, but thanks anyways..

  • I notice that each java tutorial have less views, the weaks can't hold on.

  • Isnt there easier way to hold on all off the images in the array, f.e. if u have 20 of them?

  • @Ernestas23, you can define your array as such:

    private static String fileName;

    Then in the method use:

    fileName = new String[20];

    You can now access them individually if you wish or loop through them to set a value. This is usually good if you use the same value over and over, for default values, or if you have a formula like image1 image2. for(int i=0;i<fileName.length;i++) { fileName[i] = ""; }

  • Not just thank you, but something more than that...............

  • It was really hard to see the end of your private icon [] pic = line. The first time the pictures would not change when I ran it, so I went back and heard you than say to add the second array you need 1 so change it to 1. It than worked! You are AWESOME. PLEASE SHOW HOW TO MAKE JUST ONE CLASS FILE WITH THE MAIN CLASS INSIDE THE APP PLEASE!!

  • @djlovedreamer same problem i had...:D

  • Can someone please help me out? i want to create three jcomboboxes. where the content of the 3rd box depends on the selection of the 2nd and that one depends on the selection of the first.EX:1st box holds list of manufactures while the second holds list of models and the 3rd holds trims. if i select honda in the 1st then it displays accord, civic, pilot in the second box and if i select accord then it would display LX Sedan, EX Sedan...etc. I would really appreciate anyones help. Thanks.

  • @sighkhol if that's the case you might want to use an if else statement so where if the 1st drop-down = toyota then the second drop down box holds models

  • Hi, You tutorials are great.

    ????

    Does the JCombox event receive the events as an array?

  • Thank you alot

  • Great timing. I have to do a GUI pretty soon. thanks for these vids.

Loading...
Alert icon
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