JProgressBar 定位到底部 window

JProgressBar positioning to bottom of the window

我试图将 JProgressBar 定位到 window 屏幕的底部。我试过使用 setVerticalAlignmentsetHorizontalAlignment。这样做时会出现语法错误。

为了明确起见,我的目标是在 window 的底部放置一个进度条。

一个简单的方法是设置父容器有一个BorderLayout,然后panel.add(progressBar, BorderLayout.PAGE_END);会让进度条出现在底部。