0

Can anyone give explanation and an example of Container usage?

E.g. I am trying to find JProgressBar, and all the find method has Container as the first param.:

JProgressBar pb = JProgressBarOperator.findJProgressBar([Container cont]);

I supposed that JFrame or JDialog etc. could be used (cast) as Container, but it is not. So what is it?

Ivan Gerasimenko
  • 2,381
  • 3
  • 30
  • 46

1 Answers1

0

The solution is to get Container of parent element by .getContentPane():

JFrameOperator mf = new JFrameOperator("Main Frame");
JDialogOperator jd = new JDialogOperator(mf, ""); // dialog that contains JProgressBar has no name
JProgressBar pb = JProgressBarOperator.findJProgressBar(jd.getContentPane());
Ivan Gerasimenko
  • 2,381
  • 3
  • 30
  • 46