This saved my life for a Assignment. I wasn't even aware of JLayeredPane until your video. Thank you, your content is well structured and delivered perfectly!
This is the best Java tutorial for beginners, so you can learn Java and English in one hit. Please keep going! I vote for Java advance tutorial. Thanks a lot Bro
is this tutorial enough to learn java android for android development and please what are the tutorial that you recommend for Android development thank you are the best
Wow man, you found me and this is just great! Your uploads are all very awesome and informative. I can't wait to watch these because I've been wanting to teach myself Python and C++. Thank you 😃
Once explained properly its amazing how easy it was although I was wondering if there was more explanation to the different layers. If they intended certain layers in preference for certain tasks?
Hallo Bro, your Videos are Great!! can you give me an answer to my problem? (sorry i'm german) when i add a MouseMotionListener on an Label in your Program above, it makes the dragging but its flickering . Perhaps ist not so good idea to drag Labels? Greetings from Germany Marianne
I wondered what happens when you remove Integer.valueOf() and instead just put into the number you want. Very interesting thing happens. If you put Integer.valueOf just like in the video, the label which gets 0 is first put into the screen. Label 1 is put second, label 2 is put third etc. On the other hand, if you don't write Integer.valueOf and instead you just write the number you want, then the 0 label is the one which is put the last, label 1 is put second to last etc.
Hi friend can you explain difference between Color.red and Color.RED (because java is a case sensitive language then how the constant is allow lowercase letters. its going to break java is a case sensitive language or not?)
to put it in the JFrame you can just use a label: ImageIcon infoIcon = new ImageIcon("src/info.png"); JLabel infoLabel = new JLabel(); infoLabel.setIcon(infoIcon); this.add(infoLabel); // if you are using that should work
شكرا شكرا شكرا شكرا انه مجهود رائع شكرا مرة ثانية 🤍🤍🤍 ------------------------------------ -------------------------- ---------------------------- Thanks thanks thanks thanks It's a great effort Thanks again🤍🤍🤍
import javax.swing.*;
import java.awt.*;
public class Main {
public static void main(String[] args) {
// JLayeredPane = Swing container that provides a
// third dimension for positioning components
// ex. depth, Z-index
JLabel label1= new JLabel();
label1.setOpaque(true);
label1.setBackground(Color.RED);
label1.setBounds(50,50,200,200);
JLabel label2= new JLabel();
label2.setOpaque(true);
label2.setBackground(Color.GREEN);
label2.setBounds(100,100,200,200);
JLabel label3= new JLabel();
label3.setOpaque(true);
label3.setBackground(Color.BLUE);
label3.setBounds(150,150,200,200);
JLayeredPane layeredPane = new JLayeredPane();
layeredPane.setBounds(0,0,500,500);
//layeredPane.add(label1, JLayeredPane.DEFAULT_LAYER);
layeredPane.add(label1, Integer.valueOf(0));
layeredPane.add(label2, Integer.valueOf(2));
layeredPane.add(label3, Integer.valueOf(1));
JFrame frame = new JFrame("JLayeredPane");
frame.add(layeredPane);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(new Dimension(500, 500));
frame.setLayout(null);
frame.setVisible(true);
}
}
Practicing...
import javax.swing.*;
import java.awt.*;
public class Main
{
public static void main(String[] args) {
JLabel label1 = new JLabel();
label1.setOpaque(true);
label1.setBackground(Color.BLUE);
label1.setBounds(25,25,100,100);
JLabel label2 = new JLabel();
label2.setOpaque(true);
label2.setBackground(Color.YELLOW);
label2.setBounds(75,75,100,100);
JLabel label3 = new JLabel();
label3.setOpaque(true);
label3.setBackground(Color.RED);
label3.setBounds(125,125,100,100);
JLayeredPane layeredPane = new JLayeredPane();
layeredPane.setBounds(0,0,250,250);
layeredPane.add(label1, Integer.valueOf(0));
layeredPane.add(label2, Integer.valueOf(1));
layeredPane.add(label3, Integer.valueOf(3));
JFrame frame = new JFrame("JLayeredPane");
frame.add(layeredPane);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(new Dimension (500, 500));
frame.setLayout(null);
frame.setVisible(true);
}
}
This saved my life for a Assignment. I wasn't even aware of JLayeredPane until your video. Thank you, your content is well structured and delivered perfectly!
This is the best Java tutorial for beginners, so you can learn Java and English in one hit. Please keep going! I vote for Java advance tutorial. Thanks a lot Bro
bro code... ur ma bro
THANK YOU. Oracle's descriptions were confusing, but you managed to teach me LayeredPane in a short comprehensive video. Good job.
I'm curious about why at 7:02 we need to use the wrapper class for the numbers that are being used as shortcuts to correspond to specific layers?
I think it's because of the Enum Constant. as per his Enum video. Not sure tho
is this tutorial enough to learn java android for android development and please what are the tutorial that you recommend for Android development
thank you are the best
Android uses Java but the layout is different. I believe FreeCodeCamp has a course when I did a search. They have good content
Many thanks for producing these excellent tutorials with clear explanations.
Wow man, you found me and this is just great! Your uploads are all very awesome and informative. I can't wait to watch these because I've been wanting to teach myself Python and C++. Thank you 😃
thanks! I'll be adding more Python and C++ videos in the future. Right now I have been focusing on Java for the time being due to popular demand
@@BroCodez Great! No problem, I could use some review with Java. I need to learn the swing library anyway haha
Hello Bro, curious question: I tried to call the .setBounds() methods for layeredPane, but it didn't work. Can you please help me?
Woah I’m dropping all kinds of comments
Хай тем, кто смотрит в переводе! Учимся боли в суставах, пацаны, аахах)
thanks!
Once explained properly its amazing how easy it was although I was wondering if there was more explanation to the different layers. If they intended certain layers in preference for certain tasks?
Hallo Bro, your Videos are Great!! can you give me an answer to my problem? (sorry i'm german)
when i add a MouseMotionListener on an Label in your Program above, it makes the dragging but its flickering . Perhaps ist not so good idea to drag Labels? Greetings from Germany Marianne
I wondered what happens when you remove Integer.valueOf() and instead just put into the number you want. Very interesting thing happens. If you put Integer.valueOf just like in the video, the label which gets 0 is first put into the screen. Label 1 is put second, label 2 is put third etc.
On the other hand, if you don't write Integer.valueOf and instead you just write the number you want, then the 0 label is the one which is put the last, label 1 is put second to last etc.
Thank you!!! You're the best!
In Germany we say:
"Ehre bruder! Hast uns gerettet!"
Commend XD
Love new music background :DDD
Maybe i can use this in making a GUI library
thanks
Thanks
Yea!
Hi friend can you explain difference between Color.red and Color.RED (because java is a case sensitive language then how the constant is allow lowercase letters. its going to break java is a case sensitive language or not?)
Thanks✨
Bro,
How to add multiple icons on JFrame/JDialog (example, I need to place info icon in JFrame)
to put it in the JFrame you can just use a label:
ImageIcon infoIcon = new ImageIcon("src/info.png");
JLabel infoLabel = new JLabel();
infoLabel.setIcon(infoIcon);
this.add(infoLabel);
// if you are using
that should work
Thank you very mach bro 👍👋👍
Exactly what i was looking for, thanks!❤
Very easy think
Nice video
THANK YOU Bro.
thanks bro
Thanks for lessons !!!!!!
thanks Brooooo
stuffnthings
thanks bro
Thanks
thank you for the content
Nice video
best teacher, thank you 👍
Muito bom como sempre!!!
Nice, bro!
nice vid
شكرا شكرا شكرا شكرا
انه مجهود رائع
شكرا مرة ثانية 🤍🤍🤍
------------------------------------ -------------------------- ----------------------------
Thanks thanks thanks thanks
It's a great effort
Thanks again🤍🤍🤍