JTextField 如何设置宽高

版权声明:博客知识产权来源命运的信徒,切勿侵权 https://blog.csdn.net/qq_37591637/article/details/89225182

代码如下

200,30对应的是宽和高

JTextField jtf=new JTextField();
jtf.setPreferredSize(new Dimension (200,30));

 效果图如下


猜你喜欢

转载自blog.csdn.net/qq_37591637/article/details/89225182