java - How to access an Existing JFrame Form? -


i'm having little problem accessing existing jframe form (i'm doing in netbeans way):

public class framea extends javax.swing.jframe {     frameb b;          //creates new jframe called b     framea = this;    //this jframe assigned variable     string x;     public framea() {         initcomponents();     }     private void btnclickme (java.awt.event.actionevent evt) {         x = jtextfield1.gettext();         b = new frameb();       //creates new instance of frameb         b.setvisible (true);    //opens new jframe         a.setvisible(false);    //hides or closes current jframe     }     public string getme () {         return x;                //attempts value of x     } }  public class frameb extends javax.swing.jframe {     framea = this.framea();       //calls existing jframe framea     string clickie = a.getme(); //attempts x variable framea            //assigns variable display on textarea     jtextarea1.settext(clickie);     public frameb() {         initcomponents();     } } 

i not sure doing wrong , little confused on how access existing jframe (framea here in case) current jframe (which frameb)

any appreciated! thanks!


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -