First Code in Java Swing GUI Part 2 Layout

preview_player
Показать описание


Follow on Facebook:

Subscribe to our other channel:
Telusko Hindi :
Рекомендации по теме
Комментарии
Автор

Missing part about importing *Layout
Folks you can use as follow...
import java.awt.FlowLayout;

OR

import java.awt.GridLayout;

bhavinpatel
Автор

yo king the tutorial went great until this moment here 3:48, it's not your fault sure, things tend to change and get updated, but please, revise this tutorial with some small updated, because when i am following your tutorial, java tells me it cant' find the 'FlowLayout();' symbol

leonardomurgia
Автор

Sir IAM getting cannot find symbol for FlowLayout

saikrishnamodhupalli
Автор

have to import java awt

package atest;
import java.awt.*;
import javax.swing.*;
public class Atest {
public static void main(String[] args)
{
A obj=new A();

}
}
class A extends JFrame
{
public A()
{
setLayout(new FlowLayout());
setVisible(true);
setSize(400, 400);
JLabel L1=new JLabel("hello");
JLabel L2=new JLabel("World");
add(L1);
add(L2);

}
}

viveksaxena
Автор

theres mistake
WE HAVE TO WRITE
(NAME OF JFRAME).setLayout(new FlowLayout());
write this only after creating the frame.
PIN MEE!!!!

siddhanthjaiswal