package com.company;
//public class Main {
//
// public static void main(String[] args) {
//
// write your code here// }
//}
import javax.swing.*;
import java.awt.*;
public class Main {
public static void main(String s[]) {
JFrame frame = new JFrame("JFrame Example");
frame.setVisible(true);
JPanel panel = new JPanel();
//panel.setLayout(new FlowLayout());
LayoutManager aa;
aa = new FlowLayout();
panel.setLayout(aa);
JLabel label = new JLabel("JFrame By Example");
JButton button = new JButton();
button.setText("Button");
panel.add(label);
panel.add(button);
frame.add(panel);
frame.setSize(200, 300);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//frame.setVisible(true);
}
}