简体   繁体   English

如何在两个 jframes 之间设置进度条?

[英]How to set a progress bar between two jframes?

I need a progressbar in between two jframes;ie while navigating from one jframe to other the progress of loading that frame must shown in a progressbar.It should also show a message like 'Please wait....'.Please help我需要两个 jframes 之间的进度条;即从一个 jframe 导航到另一个时,加载该框架的进度必须显示在进度条中。它还应该显示一条消息,如“请稍候....”。请帮忙

1) don't use two JFrames , use JDialog instead of..., 1)不要使用两个JFrames ,使用JDialog而不是...,

2) better woudl be useCardLayout rather than bunch of JFrames or JDialogs 2) 最好使用CardLayout而不是一堆JFramesJDialogs

3) you have to look at JProgressBar (example in the tutorial) 3)你必须看看JProgressBar (教程中的例子)

4) invoke the code about processes in JProgresBar from SwingWorker (example in the tutorial) 4) 从SwingWorker调用JProgresBar中有关进程的代码(教程中的示例)

5) more examples 5) 更多例子

Center using the parent container of the two frames?中心使用两个框架的父容器?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM