Please see the error of this program in the image
It is in java swing
blog: solvedprograms.blogspot.com
thanks
anuj
Please see the error of this program in the image
It is in java swing
blog: solvedprograms.blogspot.com
thanks
anuj
import java.applet.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;
import java.awt.*;
import java.io.*;
import java.lang.*;
public class d1 implements ActionListener
{
JButton jb;
JFrame jf;
d1()
{
button();
frame();
jf.setVisible(true);
}
public void button()
{
jb=new JButton("p2222222");
jf.add(jb,BorderLayout.EAST);
jb.addActionListener(this);
}
public void frame()
{
jf=new JFrame("p2 frame");
jf.setSize(500,500);
}
public void actionPerformed(ActionEvent ae)
{
if(ae.getActionCommand().equals(jb.getText()))
{
}
}
public static void main(String args[])throws IOException
{
SwingUtilities.invokeLater(
new Runnable()
{
public void run()
{
d1 a=new d1();
}
}
);
}
}