« Return to Thread: How get the MySQL data in a Netbeans UI

How get the MySQL data in a Netbeans UI

by anko :: Rate this Message:

Reply to Author | View in Thread

I'm very new to Java and Netbeans so I was happy that making an connection with my remote MySQL server was easy. Showing the data with System.out.println also.
But showing the data in a field on my form gives problems.
I have followed this example:
example
When I want to fill a textfield using this code:   jTextFieldMV.setText(rs.getString(1));
I receive this error message:
 TestMySQLUI.java:125: non-static variable jTextFieldMV cannot be referenced from a static context
            jTextFieldMV.setText(rs.getString(1));


How can i resolve this?

 « Return to Thread: How get the MySQL data in a Netbeans UI

LightInTheBox - Buy quality products at wholesale price