
import java.awt.*; import java.lang.reflect.*; import java.awt.event.*; import java.awt.event.WindowListener.*; class Javap extends WindowAdapter implements ActionListener{ Button b; TextArea area; TextField tf; Javap(){ Frame f=new Frame(); Label l=new Label("Welcome to javap tool"); l.setBounds(100,50,300,30);
Label l1=new Label("Enter the class name"); l.setBounds(50,100,150,30);
tf=new TextField(); tf.setBounds(210,100,100,30);
b=new Button("View Details"); b.setBounds(150,150,100,40);
area=new TextArea(20,40); area.setBounds(50,210,300,300);
f.add(l); f.add(l1); f.add(tf); f.add(b); f.add(area); f.addWindowListener(this); b.addActionListener(this); f.setLayout(null); f.setVisible(true); f.setSize(500,500);
} public void actionPerformed(ActionEvent e) { if(e.getSource()==b) { String s=tf.getText(); String s1="";
Class c=Class.forName("s.Class");
Method m[]=c.getDeclaredMethods();
for(int i=0;i area.append(m);
area.append("\n");
} }
}
public void windowClosing(WindowEvent e)
{
System.exit(0);
} public static void main(String args[]) throws Exception
{
new Javap();
}
}

sorry for above question asked by me is wrongly paste the source code is below please provide me best answer:
import java.awt.*; import java.lang.reflect.*; import java.awt.event.*; import java.awt.event.WindowListener.*; class Javap extends WindowAdapter implements ActionListener{ Button b; TextArea area; TextField tf; Javap(){ Frame f=new Frame(); Label l=new Label("Welcome to javap tool"); l.setBounds(100,50,300,30);
Label l1=new Label("Enter the class name"); l.setBounds(50,100,150,30);
tf=new TextField(); tf.setBounds(210,100,100,30);
b=new Button("View Details"); b.setBounds(150,150,100,40);
area=new TextArea(20,40); area.setBounds(50,210,300,300);
f.add(l); f.add(l1); f.add(tf); f.add(b); f.add(area); f.addWindowListener(this); b.addActionListener(this); f.setLayout(null); f.setVisible(true); f.setSize(500,500);
}
public void actionPerformed(ActionEvent e) { if(e.getSource()==b) { String s=tf.getText(); String arg[]=new String[10]; arg[0]=s;
Class c=Class.forName(arg[0]);
Method m[]=c.getDeclaredMethods();
for(int i=0;i System.out.println(m[i]);
} }
} public void windowClosing(WindowEvent e)
{
System.exit(0);
} public static void main(String args[]) throws Exception
{
new Javap(); }
}

sorry for above question asked by me is wrongly paste the source code is below please provide me best answer:
import java.awt.*; import java.lang.reflect.*; import java.awt.event.*; import java.awt.event.WindowListener.*; class Javap extends WindowAdapter implements ActionListener{ Button b; TextArea area; TextField tf; Javap(){ Frame f=new Frame(); Label l=new Label("Welcome to javap tool"); l.setBounds(100,50,300,30);
Label l1=new Label("Enter the class name"); l.setBounds(50,100,150,30);
tf=new TextField(); tf.setBounds(210,100,100,30);
b=new Button("View Details"); b.setBounds(150,150,100,40);
area=new TextArea(20,40); area.setBounds(50,210,300,300);
f.add(l); f.add(l1); f.add(tf); f.add(b); f.add(area); f.addWindowListener(this); b.addActionListener(this); f.setLayout(null); f.setVisible(true); f.setSize(500,500);
}
public void actionPerformed(ActionEvent e) { if(e.getSource()==b) { String s=tf.getText(); String arg[]=new String[10]; arg[0]=s;
Class c=Class.forName(arg[0]);
Method m[]=c.getDeclaredMethods();
for(int i=0;i System.out.println(m[i]);
} }
} public void windowClosing(WindowEvent e)
{
System.exit(0);
} public static void main(String args[]) throws Exception
{
new Javap(); }
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.