java 文本框和标签对齐不对齐
关注:108 答案:2 mip版
解决时间 2021-01-26 12:26
提问者習慣邇的習慣
2021-01-25 20:45
源代码
package awt; //代码有问题
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class GridBagLayoutDenmo extends Frame{
//声明初始化各个类型的值
Label l1,l2,l3,l4;
TextField tf1,tf2,tf3;
Button btn1,btn2;
CheckboxGroup cbg;
Checkbox cb1,cb2,cb3,cb4;
GridBagLayout gb;
GridBagConstraints gbc;
public GridBagLayoutDenmo(String title){
super(title);
l1 = new Label("用户名");
l2 = new Label("密码");
l3 = new Label("重复密码");
l4