package com.shrimpking.t13;
import javax.swing.*;
import java.awt.*;
/**
* Created by IntelliJ IDEA.
*
* @Author : Shrimpking
* @create 2024/9/28 11:40
*/
public class SampleLayout4_13 extends JFrame
{
JPanel panel1;
JButton button1;
JButton button2;
JButton button3;
FlowLayout flowLayout1;
public SampleLayout4_13(){
super("流式布局管理器"); //调用父类构造器,设置标题
panel1 = new JPanel();
flowLayout1 = new FlowLayout(FlowLayout.LEFT); //左对齐
panel1.setLayout(flowLayout1);
button1 = new JButton("Ok");
button2 = new JButton("Open");
button3 = new JButton("Close");
panel1.add(button1);
panel1.add(button2);
panel1.add(butt
09-30
491
09-29
1101