我有以下情况:
Label label = new Label();
label.setText("bla");
RoundedRectangle fig = new RoundedRectangle();
fig.add(label);
FlowLayout layout = new FlowLayout();
layout.setStretchMinorAxis(true);
fig.setLayoutManager(layout);
fig.setOpaque(true);
这仅适用于使用 layout.setHorizontal(true/false); 使标签垂直或水平居中。,但不在一起。知道如何使它工作吗?