Your ease of speaking through difficult topics and common sense approach of explaining Swing is absolutely fantastic. Thank you Dave, I have learned more of your tutorial than anywhere else.
Thank you so much for this video! I'm doing a project in my uni comp sci class and the professors expect us to learn this all ourselves, so this video really helped!!
in case someone hesitate what kind of layout they should use based on Oracle site instruction: "If you are not interested in learning all the details of layout management, you might prefer to use the GroupLayout layout manager combined with a builder tool to lay out your GUI. One such builder tool is the NetBeans IDE. Otherwise, if you want to code by hand and do not want to use GroupLayout, then GridBagLayout is recommended as the next most flexible and powerful layout manager."
depends of version windows builder can show the interface, but maybe with this change can be run JComboBox combo = new JComboBox(new String[] {"Item 1", "Item 2", "Item 3"});
I learned a lot from you. But i got a question. I have a project that uses drag and drop swing and I want to modify something but it seems that the components cannot be modified for some reason.. How do I do it using code?
Hi, I don't really get what you mean by components being modified. Can you reduce your problem down to a minimum number of lines of code and then explain exactly what is happening and what you want to happen?
@@javadave i start by creating a JFrame class then dragging and dropping components into the frame. As i do it, it creates the code by itself into the class but if i wanna edit the components i added, i cannot edit directly with code. It's the InitComponents() method that holds all the components code. Sorry if it's still confusing
@@pjguitar15 I get it, you are using an editor to create your user interface. I wonder if the editor is somehow locking you out of the code, somehow making it read only (I'm only guessing here). Can you see the code? If you can, perhaps you could do the design with the editor and then copy/paste the code into a new project and then edit it there.
Hey, I hope to receive a reply. I just wanna ask how to automatically enlarge my internal components inside a panel when it is maximized -means that when I maximized my frame to its full state, the components inside the panel should follow the resizing and still stay in their current positioning as they were before it is maximized. I'm using GUI builder btw, thanks!
Hi, Java layouts are quite good at this. If you use a GridLayout this should just work. BorderLayout I think will only make the central component larger (this is useful if you imagine a canvas type application with toolbar, status bar etc.). FlowLayout doesn't do it and FlowLayout is the default, so you need to change it. I'd recommend using GridLayout/GridBagLayout and experimenting with those. You still have the problem of font sizes not resizing but you should find your components grow with the window. So, in summary, do setLayout(new GridLayout(2,2)); ...then add a button... then resize - you should see the Button occupy 1/4 of your window no matter how big you make it.
@@javadave Thanks, I appreciate this. So as you said, I still have the problem with the words not resizing by themselves automatically. Does that mean I should do it manually (resize the jlabel when I click the button to maximize my frame)?
@@princekachu1840 You could do a window resize listener and then set the font on the components. Somehow, this doesn't seem like good practice to me though. Another thing to think about might be setting the maximum size of your window so it doesn't get too much larger than you want.
Your ease of speaking through difficult topics and common sense approach of explaining Swing is absolutely fantastic. Thank you Dave, I have learned more of your tutorial than anywhere else.
Thanks Dave, very kind of you to say.
Thankyou for this excellent series. I can't say enough about the quality and clarity of the explanations.
Thanks. It's nice to hear it's appreciated.
I lost my sanity looking for a decent layout manager only to discover I could use the absolute layout all along! Thanks
Haha, yes, there was a time for me too when I didn't know about absolute layout. I've been through this as well.
Thank you found your video after being lost at web for about 3 days nice video thank you
Thanks! Glad to hear it.
Thank you so much for this video! I'm doing a project in my uni comp sci class and the professors expect us to learn this all ourselves, so this video really helped!!
Thanks Daven. If you have any suggestions about other topics that would be useful, do let me know. People like you are target audience.
You're a life saver. Thank you for this very informative video!
Thanks for saying so :)
in case someone hesitate what kind of layout they should use based on Oracle site instruction:
"If you are not interested in learning all the details of layout management, you might prefer to use the GroupLayout layout manager combined with a builder tool to lay out your GUI. One such builder tool is the NetBeans IDE. Otherwise, if you want to code by hand and do not want to use GroupLayout, then GridBagLayout is recommended as the next most flexible and powerful layout manager."
That's a great tip Wilasta. UI editors can save time but I think its good to know what's going on under the hood. GridBagLayout can be a bit painful.
Thank you for this amazing playlist.
This is the best swing tutorial series! Already subbed. Thank you so much for your content!
Thanks. :)
This was an excellent tutorial, thank you so much!
You're very welcome!
That was very helpful, i'll definitely watch the other videos!
Thankyou. I hope you find some other useful info. If you have any suggestions, let me know.
Thanks Dave! Great video
Thanks for saying so Kobe.
This guy doesn't blink
I'm AI generated.
Yes, it great topic indeed
I agree. I find user interface work to be quite creative and fun. Thanks for watching.
thank you
You're welcome
Thank you! 😁
You're welcome!
Thank you sir
You're welcome. Hope it was useful.
Thanks!
You're welcome
love u man thanks
Thanks a lot. I hope it was helpful.
thank you so much! I just subscribed!
Thanks for the sub!
Great code and explanation. Can you put the link of project?
I didn't save it. Sorry about that.
depends of version windows builder can show the interface, but maybe with this change can be run
JComboBox combo = new JComboBox(new String[] {"Item 1", "Item 2", "Item 3"});
I learned a lot from you. But i got a question. I have a project that uses drag and drop swing and I want to modify something but it seems that the components cannot be modified for some reason.. How do I do it using code?
Hi, I don't really get what you mean by components being modified. Can you reduce your problem down to a minimum number of lines of code and then explain exactly what is happening and what you want to happen?
@@javadave i start by creating a JFrame class then dragging and dropping components into the frame. As i do it, it creates the code by itself into the class but if i wanna edit the components i added, i cannot edit directly with code. It's the InitComponents() method that holds all the components code. Sorry if it's still confusing
@@pjguitar15 I get it, you are using an editor to create your user interface. I wonder if the editor is somehow locking you out of the code, somehow making it read only (I'm only guessing here). Can you see the code? If you can, perhaps you could do the design with the editor and then copy/paste the code into a new project and then edit it there.
Hey, I hope to receive a reply. I just wanna ask how to automatically enlarge my internal components inside a panel when it is maximized -means that when I maximized my frame to its full state, the components inside the panel should follow the resizing and still stay in their current positioning as they were before it is maximized. I'm using GUI builder btw, thanks!
Hi, Java layouts are quite good at this. If you use a GridLayout this should just work. BorderLayout I think will only make the central component larger (this is useful if you imagine a canvas type application with toolbar, status bar etc.). FlowLayout doesn't do it and FlowLayout is the default, so you need to change it. I'd recommend using GridLayout/GridBagLayout and experimenting with those. You still have the problem of font sizes not resizing but you should find your components grow with the window. So, in summary, do setLayout(new GridLayout(2,2)); ...then add a button... then resize - you should see the Button occupy 1/4 of your window no matter how big you make it.
@@javadave Thanks, I appreciate this. So as you said, I still have the problem with the words not resizing by themselves automatically. Does that mean I should do it manually (resize the jlabel when I click the button to maximize my frame)?
@@princekachu1840 You could do a window resize listener and then set the font on the components. Somehow, this doesn't seem like good practice to me though. Another thing to think about might be setting the maximum size of your window so it doesn't get too much larger than you want.
Thanks! Great videos btw, keep on coding!@@javadave