Answer Posted / chandra rekha
use the getGraphics method to get an object of the graphics
class and with that object we can perform draw methods.
for example
public class myclass extends...implements ActionListener
{
...
...
....
public void actionPerformed(ActionEvent ae)
{
if(ae==....)
{
Graphics g=getGraphics();
g.drawLine(100,200,150,250);
}
}
.....
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the use of java swing?
How to print in java swing application?
What is layout in java swing?
Why swings are called lightweight components?
How to add calendar in java swing using eclipse?
What is java swing package?
What is swing control?
Is swing still used in java?
What does javax swing do?
What is jfc swing in java?
What are the advantages of java swing over angular?
How do you swing an applet?
Why are swings considered lightweight?
What are the advantages of the event-delegation model over the event-inheritance model?
What do you mean by java swing?