I have a class extending JDialog, it contains a JTextField and a button开发者_StackOverflow中文版, a jProgressbar when user cliks on the button a Jprogress bar(Dynamic) must be visible
Add you JProgressBar to Frame when user clicks on Button and repaint the frame. Your progrss bar will be visible.
In button press event:
public void actionPerformed(ActionEvent ae)
{
..........
add(progressBar);
repaint();
.........
}
Hope this helps.
精彩评论