我有一个JLabel
我希望将高度和宽度都设置为JFrame
的百分比,比如说10%。如何在Java中实现这一目标?我有JLabel
名称外观和JFrame
命名屏幕
JFrame screen = new JFrame("Example");
...
JPanel lookReplyGUIPanel = new JPanel(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
JLabel lookx = new JLabel("something");
c.gridx = x+1;
c.gridy = y+1;
lookReplyGUIPanel.add(lookx,c);
谢谢!所有帮助赞赏