title: ActionListener between classes?
body: <p>i got promt.java and gui.java files. once i click on OK button on promt it will disappear and run db query. i wanted to get the query result on JTextField on gui.java tried SetText and append from the promt.java but didn't work. its getting the query result to a variable inside the promt but not getting it in gui. </p>
  
  <p>Promt Actionlistener for OK Button</p>
  
  <pre><code>try{
              Class.forName(jdbc_driver);
              con=DriverManager.getConnection(db_url, "root", "");
              ps=con.prepareStatement(sql);
              rs=ps.executeQuery();
              if(rs.next());{
                  i = 1;
                  id=rs.getString("id")+"";
                  ovog=rs.getString("ovog")+"";
                  ner=rs.getString("ner")+"";
                  cardnum1=rs.getString("card_number")+"";
                  val=rs.getString("dvn")+"";
                  GUI guu=new GUI();
                  guu.screen3.setText("id: "+id +"   "+"ovog"+ovog+"   "+"ner"+ner+"   "+"card number"+cardnum1+"   "+"dun"+val);
              }}
  
              catch(Exception e){
                  System.out.println("Not Found!");
                  e.printStackTrace();
              }
  </code></pre>
  
  <p>GUI Actionlistener</p>
  
  <pre><code>public void actionPerformed(ActionEvent e) {
      if(e.getSource()==card){
          Cardpromt cp=new Cardpromt();
          cp.prompt();
      }
  </code></pre>