Not sure if this is related at all but having another issue with a
'second-level dialog' - if I have a dialog open, button is clicked,
color chooser is shown, tab is selected, textboxes are found <- this
all seems to work and I can see the components on the screen - but
when I try to have text entered into them, I get an illegalstate
exception because they aren't showing (?).
> JOptionPaneFinder.findOptionPane().using(BasicRobot.robotWithCurrentAwtHierarchy());
> optionPane.requireMessage("Hello");
> pause(1);
> optionPane.click();
> window.close();
> }
>
> void pause(int secs)
> {
> try
> {
> Thread.sleep(secs * 1000);
> }
> catch (InterruptedException e)
> {
> throw new RuntimeException(e);
> }
> }
>
> class MyFrame extends JFrame
> {
> MyFrame()
> {
> JButton btn = new JButton("Click");
> btn.addActionListener(new ActionListener()
> {
> @Override
> public void actionPerformed(ActionEvent arg0)
> {
> System.out.println("clicked");
> JOptionPane.showMessageDialog(MyFrame.this, "Hello");
> }
> });
> add(btn);
> pack();
> }
> }
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -