swing - passing an array from a jframe class in java -


i searched question on stackoverflow , found stuff helped, didn't understand can do...

i have jframe class contains these codes (it's part of class)

public class compiler extends javax.swing.jframe {  /**  * creates new form compiler  */ public compiler() {     initcomponents(); }  /**  @suppresswarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="generated code">                           private void initcomponents() {       );      pack(); }// </editor-fold>                          private void jbutton1actionperformed(java.awt.event.actionevent evt) {                                             string[] input= new string[500];  input = jtextarea1.gettext().split(" |\n" );  int x=0;      int n=input.length;  int k=0;  string[] other = new string[100]; 

in project, have class want pass "string other". however, don't know how it.

i think problem jbutton1actionperformed private method , can't change it.

can me this?

one simple fix declaring instance of class pass string[] globally, (unless not need keep around). in class set value on define method that.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -