final Panel p = new Panel();
p.setLayout(new BorderLayout());
embedded_frame.add(p,BorderLayout.CENTER);
embedded_frame.validate();
p.add(btn);
p.validate();
frame.setVisible(true);
Robot robot = new Robot();
tk.realSync();
Util.clickOnComp(btn, robot);
tk.realSync();