How can you draw using Swing components?
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 |
Why should any swing call back implementation execute quickly?
Explain the differences between an applet and a Japplet?
2 Answers College School Exams Tests, Satyam,
What is jfc swing in java?
How to render an html page using only swing.
What is import javax swing?
Which containers use a border Layout as their default layout in swing?
what do u mean by GUI framework
How to reload a jframe in java swing?
How is parsing html used in swing?
What are the advantages of the event-delegation model over the event-inheritance model?
What are the various components of swing?
What is difference between applet and swing?