Added: 2 years ago
From: MrJavaHelp
Views: 41,686
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (105)

Sign In or Sign Up now to post a comment!
  • nice nice nice :))) fanks brother

  • omg....that's what i need for my application...you help me alot.

    thank you....

    thank a millions!!!

  • Oracle should put that tutorial on their website.

  • Comment removed

  • im using Jgrasp. Copied you coding exactly and still didn't work... any advice?(copied it EXACTLY)

  • nice. but your microphone is really annoying..

  • I used this for 3 radio buttons called Beginner, Intermediate, Expert. Used borderlayout.west and added all of them to a group box. My problem is that they're not all alligned even if x is 0 everytime(only changed y). Intermediate is a little to the left, probably because it's longer than the rest. Any fixes? Thanks!

  • X is left to right, Y is top to bottom, so like 10, 20 is ten units to the right, and 20 down, not trying to sound smart or anything but the illustration he made was backwards

  • @gr1mtoy6100 exactly what i thought when i saw it lol btw i'm on 1st semester of CS and i'm awesome

    just kidding

  • @Nikixos C sharp or computer science?

  • AWESOME ! JUST AWESOME!!!!!

    Thank you so much sir!

  • Good Stuff. Nice and slow and not super complicated with good explainations. Thanks man.

  • well done mr.java help

    thanks alot for your videos

  • When ever I make a program with a Gui and I add a JLabel or a JButton then it wont show up untill I re-size the window. Does anyone else have this problem?

  • @MrPitbull917 yes, wtf!?

  • GOOD EXPLAINATION

  • Better than my ex prof :D

    Nice job

  • Bro, if you are not a teacher you should be, you explain things well. Keep up the good work. A+

  • hey man for some reason i cant position the buttons any help?

  • thanks you are life saver :)

  • good one.. thanks.

  • question. when changing the gridx and gridy, they don't change, plus from experimenting a bit it seems that the coordinates are relative to the label themselves and not the page. Any help here on that would be great

  • @grulloc i just had the same problem. i solved it by adding height and width 2 component :)

  • @whizZen how?

    

  • Insets(int top, int left, int bottom, int right)

  • well done. I just would like to say one thing... when using coordinates its(X,Y) not (Y,X). just throwing that out there.

  • Im trying to add a JList to my JFrame using this layout but it always stays centered what should I do?

  • Good tutorial, You mention that SWING is difficult without a visual editor, VE is available for eclipse, I think using VE is not very straight forward though, maybe worth a tutorial!! Cheers again mate!

  • Comment removed

  • Thank you very much. Your videos are helping me a lot in my high school Java class.

  • I say "gooey" as well like everybody else LOL

    Well explained - Thank you

  • <3

  • when I use gridheight or gridwidth the program doesn't place the buttons in the right order :l

  • How do you put them at TOP LEFT corner?

  • @TRana9 North east

  • Comment removed

  • @TRana9 gridx = 0 gridy = 0

  • Comment removed

  • @BenGeocth thats not correct.

  • Thank you very much <3

  • Very useful tutorial, helped my learn a better alternative to GridLayout which is very limited.

  • Mann, you´re great !!! Thanks !!!

  • i dont know wy but my 0;0 coordinates is in the middle of the screen :/

  • Hii.... . .you done a great job but i want to adjust labels and button on LEFT most side Of frame using GribBagContainer i've many Objects but i can't.. . . plz help

  • Hi.. The video is gud and useful.. I just need a small clarification.. dont we have to set layout for a panel ? It seems that it picks up the layout when you send gridbaglayout object when u add the object.. I used to set the layout separately in my code.. can you jst clarify?

  • clear, succinct and free of jargon. This is how a tutorial should be, well done :)

  • cool i'll watch the rest of vids..

  • thanks so match

  • what does GetContentPane() do?

  • Hey man.....i REALLY like ur vids.....

    u would be doin all of us a favour if u could upload the videos on rapidshare or sumthin (not on ShareCash plz!) or create a torrent n post us a link.....this is cuz when i try to download ur vid, it says format not detected......

    Thanks,

    Abhiram.

  • thanks for the video man . It really helped me out

  • TNX MAN! your vid helps me a lot :D

  • I found out you need to specify the gridWidth, gridHeight also with the gridX and gridY coordinates in order to get the correct results.

    Also, it does work with the content pane and components don't need to be added to a JPanel as in the video.

  • Comment removed

  • @8:13 insets arguments are top, left, bottom, right according to Eclipse.

  • Thank you =D

  • thnx! HELPS ME ALOT!!!!!!!! :D

  • Very nice but the audio is not so good

  • That was the best damned video I have ever seen thank you for posting it helped a lot!

  • tnx mr.javahelp...more power..

  • How do i make the:

    frame.getContentPane().add(pan­el, BorderLayout.NORTH);

    also position the panel to the west? I want it to be both NORTH and west:D

  • Awesome tutorials man! Thank you very much. :-D

  • Agreed, this has been the most HelpfulTutorial in regards to layouts using a grid. Thanks!!!

  • nice video man... well explained... you got me out of a lot of trouble. haha (Y)

  • He actually got the axis wrong. X is the first parameter and goes from left to right. Y is the second parameter and goes from top to bottom.

  • Man that due was so fast at typing out 5 JLabels lol

  • *thumbs up* well explained . this is awesome nd helpful for someone like me ! i have a question mr.javahelp . i would like to change the bg of my frame and the buttons also . is it possible ? if yes , how can i do that ? tnx for ur help and i'll be waiting for ur reply .. :))

  • @lezahann you mean the background color?

    you can try using

    yourFrame.setBackground(Color.­anycolor); for example

    Frame1.setBackground(Color.CYA­N);

    and it is the same for the buttons. hope this is the answer ur looking 4

  • even if i set south, it still appears in the nroth? can anyone help me?

  • @hermanjr I tested the code worked fine for me, maybe a typo?

    public static void main(String[] args) {

    JFrame frame = new JFrame("Test");

    frame.setSize(500,500);

    frame.setVisible(true);

    frame.setDefaultCloseOperation­(JFrame.EXIT_ON_CLOSE);

    JPanel panel = new JPanel(new GridBagLayout());

    frame.getContentPane().add(pan­el, BorderLayout.WEST); // key is the North, South, East, West

    GridBagConstraints c = new GridBagConstraints();

  • I've discovered that if you want to use the anchor field, you need to set weightx or weighty to non-zero.

  • Well explained. Good job.

  • thanks ...but could you tell me how to set button's size,if I want to create a small one what i have to do

  • hey java dude can u help me..??...how do u place a text field next 2 the JLabel... i am on a really hard assignment i need to have a text field to enter data...like in a form????...PLEASE HELP I AM ON A DEADLINE....that one thing that is missing from this vid....

  • That was awsome and very helpfull go on man you are great

  • Hi MrJavaHelp, I need help. Smiles. I am creating a GUI address book and I'm not sure how to ad the JTextFields. Could you explain? Also, I need to add two buttons, however when I do, I can't re-arrange them to move to the BOTTOM of my JFrame. Can you also explain that for me. I love your videos, PLEASE keep making them. Thanks.

  • Hi MrJavaHelp

    Thanks a ton man..

    ur Swing tutorials were really helpful...

  • I realized how its pronounced ... I say "gooey" because its faster to say rather than spelling it out each time.

    Similarly, people prefer to say "cuz" rather than "because" due to the fact that its shorter.

    thanks for your comment

  • @MrJavaHelp Very true. GUI is 3 syllables, where as "gooey" is only 2 :)

  • @MrJavaHelp As a matter of a fact, GUI can correctly be pronounced as "gooey". chamillion02 failed,

    you win.

  • @chamillion02 Yeah! [/sarcasm] You can't spell, very professional on your part.

  • Comment removed

  • @chamillion02 Isn't it ironic that you correct someones grammar with poorly constructed sentences? "It's pronounced as"; eliminate the word "as", it's redundant and unnecessary. When you use the term "in fact" it should be separated from the sentence with a semicolon and comma . eg. "Your grammar is; in fact, terrible". Finally, you ended your comment with a preposition which is; in fact, terrible grammar practice.

  • @chamillion02 So basically you are telling me that you pronounce DOS as D.O.S and LAN as L.A.N? GUI is in fact pronounced "Gooey". Oh, stop using "your" in place of "you're". I know this post is a year old but I.D.G.A.F!

  • @n3wbizzle666 you're and your. aren't they pronounced the same?

  • @lhyx1990 They're pronounced the same but they do have different meanings. It confuses people that actually use them properly.

  • @chamillion02 All profession programmers say 'gooey'. Stop talking like you actually know what you are saying. Imbecile.

  • @chamillion02

    Not knowing how to spell or use proper grammar is also not very PROFESSIONAL. If YOU'RE going to try to correct someone, at least make sure you know what you're talking about first, and how to convey it correctly.

    I am in a computer science program currently learning how to build GUI's in Java, and all of my teachers and colleagues pronounce it as "gooey". It is widely used in the CS world and not incorrect at all.

    Better luck next time.

  • @chamillion02 "it isn't professioanl"

    This guy sounds like such a nerd. L-O-L

  • @jdayguides Well guess what? You are a NERD for watching it fool! At least I have an excuse because I'm in college and you are probably just a troll. So shut the fuck up!

  • @chamillion02

    I know many professionals who use the term GOOEY. Shut up.

  • @chamillion02 I don't I know anyone who says "I-S-O" or "G-U-I".

  • @chamillion02 Fuck you whoever you are! idiot!

  • @chamillion02 You should also have you're in the last line because you meant to say "what you are talking about." Your is used with possession. So stop posting useless comments. We're all trying to learn something.

  • MrJavaHelp i have a question for u.. well i have a panel inside of a frame wich has a jButton , 2 jTextfield and a Jlabel, when i press the button i go to another panel wich contains more elements, the thing is i would like to have my first panel centered in the window.. im using a cardLayout for changing panels.. what do u suggest?.. thanks

  • nice tutorial man.. helped me a lot

  • Nice explanation, thanks.

  • Thanks, I've had a heck of a time finding good how-to's for GUI's using Eclipse without adding a plugin for visual editing, this was really helpful to me.

  • This is like the only tutorial on positioning objects in a frame on the whole internet, really good job man!

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