i am pretty new i am sorry if i use terms incorrect. I am trying to learn Swing and import it to my current project. In my main file, a method prints a list from mysql database. I want this : when button pressed, print this output to textfield or dialog window, show on the gui, not only cmd output. I hope I could explain my request correctly. I use Netbeans as IDE.

method in Baglanti.java :

```
public void dogList() {
    String sorg = "Select * From dogs";
     NewJFrame frame1 = new NewJFrame();

    try {
        statement = con.createStatement();
        ResultSet rs = statement.executeQuery(sorg);
        while (rs.next()) {
            int id = rs.getInt("id");
            String name = rs.getString("name");
            String species = rs.getString("species");
            int age = rs.getInt("age");
            String owner = rs.getString("owner");
            String date = rs.getString("date");

            System.out.println(" id : " + id + " name: " + name+ " species: " + species+ " age: " + age+ " owner: " + owner+ " date: " + date);
        }

    } catch (SQLException ex) {
        Logger.getLogger(Baglanti.class.getName()).log(Level.SEVERE, null, ex);
    }

}

}

```

and my list button in NewJFrame.java

```
private void listbuttonActionPerformed(java.awt.event.ActionEvent evt) {                                           
    Baglanti baglanti = new Baglanti();       
    // i don't know what next

```

Thanks.