java - Access a class object from its inner class -


this method inside jframe object, how can pass jframe object argument method in inner class?? code is: comment explains interested do:

public void runtime(){                 actionlistener action = new actionlistener(){             public void actionperformed(actionevent e){                 count++;                                 text.settext(new integer(count).tostring());                 while (count==2012){                     //i want pass frame holds rather null, how possible?                     joptionpane.showmessagedialog(null, "helloend", "end of world", joptionpane.information_message, new imageicon("explode.jpg"));                     break;                 }             }         };         tr = new timer(1000,action);         tr.start();     }  

hopefully, question wasn't answered before. anyway, try

 joptionpane.showmessagedialog(jframe.this, "helloend", "end of world", joptionpane.information_message, new imageicon("explode.jpg")); 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -