I am working at symbolic derivatives of concrete functions. I have three classes.
fnc.java represnets how to looks like derivatives individual functions. For example:
public void der_cotg(Graphics g,int x, int y){
drawBroken_line(g,"-1","sin (x)",x+23,y); //putting pixels between x and y
g.setFont(new Font("Arial", Font.BOLD,18));//Graphics g
g.drawString("2", x+66, y+18);
}
Jmain.java is JFrame form, represents field, where we can see vizualization of derivatives functions. There are two labels
- f(x) =
- g(x) = ,
two panels next to them
and button that opens antother JFrame choose.java where you can choose function. It is consists of Jpanel and buttons(which represents concrete function) If you press one of theese button, concrete function will be shown at choose.java 's Panel.
I want to get Graphics from choose.java and set Jmain.java 's Panel. I know how to get and set textfields, but I have not found if it is possible with Panels.