Sunday, 15 August 2010

java - javax.swing.JComponent cannot be resolved -


I am beginning with Java programming I encountered an error - the solution of javax.swing.JComponent Can not be done whenever I execute the following programs.

  import javax.swing.JOptionPane; Square apple {public static zero main (string algos []) {string A = joppenpane. Show input dialog ("insert number"); String B = Joppenpen. Shoinputdialog ("Enter second number"); Int number1 = integer. Parsient (a); Int number 2 = integer. Pursuit (B); Int sum = num1 + num2; Employmentpan Show Messagidoug (empty, "yoga" + yoga, reply, joppenpen. PLANE_MESSAGE); }}  

Can anyone suggest solutions?

  public static zero main (string [] args) {string A = joppenpen. ShowInputDialog ("Enter a Number"); String B = Joppenpen. Shoinputdialog ("Enter second number"); Int number1 = integer. Parsient (a); Int number 2 = integer. Pursuit (B); Int sum = num1 + num2; Employmentpan Show Messagidoug (empty, "yoga" + yoga, "answer", joppenpane.plin_msssag); }  

You were using the wrong motionpane. You need to use PLAIN_MESSAGE instead of PLANE_MESSAGE. Apart from this, the answer field is a string that needs to be a string, I want to use Eclipse or Netbeen using an IDE so that you can avoid such issues.


No comments:

Post a Comment