joptionpane - errors with java on eclipse -


what doing wrong , how fix it? i'm running on eclipse.

import java.awt.component;  import javax.swing.icon;  public class joptionpane {      public static void main(string[] args) {          // joptionpane inputs         component parentcomponent = null;         object message = "what think of hudson?";         string title = "very important!";         string choice1 = "1";         string choice2 = "2";         string choice3 = "3";         int optiontype = joptionpane.yes_no_option;         int messagetype = joptionpane.error_message;         icon icon = null;          // joption pane display         object[] options = { choice1, choice2, choice3 };         int option = joptionpane.showoptiondialog(parentcomponent, message, title,                 optiontype, messagetype, icon, options, options[2]);          // switch         switch (option) {         case 0:             //button 1 result             break;         case 1:             //button 2 result             break;         default:             //button 3 result             break;         }          return;     } } 

the errors:

your class name conflicting javax.swing.joptionpane - rename else can import class


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -