我有一个带有边框布局的摆动 GUI。在NORTH
我添加了一些组件。我的带有 GIF 图标的标签组件lblBusy.setVisible(false);
稍后是不可见的,一个按钮使其可见,如下所示。为什么它不显示?
btnDownload.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
lblBusy.setVisible(true);
btnCancel.setEnabled(true);
}
});
download = new Download(txtSource.getText(), new File(txtDestination.getText()), textAreaStatus);
download.start();
lblBusy.setVisible(false);
}
});