acces to the public function in JForm
I am sorry, but I have problem with acces to public function.
I created
JFrame frame = new JFrame("MyForm");
frame.setContentPane(new MyForm().$$$getRootComponent$$$());
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.pack();
frame.setVisible(true);
my basic class - MyForm -include jlabels and buttons. I created set functions
example
public void setMyFirstButton(String s){
myButton.setText(s);
}
but if I written
frame. (frame + dot) , I didn't see it in context menu my set functions.
What must I write any more?
Thanks
PS It is my last new thread on January, I promise :)
请先登录再写评论。
did you have a look at http://www.jetbrains.com/idea/training/demos/GUI_Designer/GUI_Designer.html ?
Yes, I have download this video on HDD. I am watching on this video again just now, but I don't see creating basic JForm ( Font viewer ) from another JForm. Really, I have tryed many tests, but without good result.
I know already, how result this problem.
MyForm my = new MyForm();
my.setFunction.......
JFrame frame = new JFrame("MyChildrenForm");
frame.setContentPane(my);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.pack();
frame.setVisible(true);