question about displaying button field and grahics line on the screen
Please Login to Remove!
Hello,
I want to display a button field and a line on the screen. code:
ButtonField myButton1 = new ButtonField("hello");
myButton1.setEditable(true);
XYEdges b1 = new XYEdges();
b1.set(5, 10, 5,10);
myButton1.setPadding(b1);
this.setPadding(b1);
this.add(myButton1);
Graphics GUI = this.getGraphics();
GUI.drawLine(25, 275, 55, 275);
however, only the button can be showed on the screen. The line will disappear once "this.add(myButton1)" is called.
how can I solve it?
Thank you
|