Search code examples
javaswingjframejprogressbar

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


Solution

  • 1) don't use two JFrames, use JDialog instead of...,

    2) better woudl be use CardLayout rather than bunch of JFrames or JDialogs

    3) you have to look at JProgressBar (example in the tutorial)

    4) invoke the code about processes in JProgresBar from SwingWorker (example in the tutorial)

    5) more examples