java Swing GUI 入门-图片和控件可视化
觉得有用的话,欢迎一起讨论相互学习~
加入一张图片
一个Imagelabel 设置居中,命名为logoLabel,Custom Create 打勾.
注意要保持图片的尺寸,要不然太大了把其他的内容都遮住了
private void createUIComponents() {
logoLabel = new JLabel();
ImageIcon logoIcon = new ImageIcon(new ImageIcon("image/a.png").getImage().getScaledInstance(300, 250, Ima