title: How can I create a Java GUI that reads SQL code and outputs the result?
body: <p>I have a Java application successfully connected to a SQL Database. I need to create a simple GUI with 2 dialog boxes, one where I can type in an SQL Query and the 2nd box outputs the result by pulling data from the database after clicking a button. How would I go about doing this code wise? I've set up the GUI, but I don't know how to get the Java to read the SQL queries that I would type in. </p>