Database GUI

How can I make a text field in NetBeans 7.2 show the value of a field in a Java DB (Derby) database for different rows using JDBC and JDK 7? Also, How can I make a 'back' and 'forward' button which navigate rows. For example, how can I make a text field show the title of a painting and a forward button select the next row so that the title of the next painting is shown.

Re: Database GUI

You will need to learn two processes -- 1) creating a Swing GUI with a JTextField that can accept data, and 2) creating a Derby database that allows you to retrieve data, and there are plenty of decent tutorials that will show you how to do both. Then once you learn these steps, write code to combine them. There's no magic involved, but just one "trick" in that you will want to read the Oracle Swing tutorial titled "Concurrence in Swing" (Google this -- it's the first hit), as you will want to do your database calls on a thread that is background to the Swing thread.

Re: Database GUI

Originally Posted by Asef

Thanks Fubarable but I can't find tutorials that show me how to do both processes, please can you provide me with some links or tell me what to Google.

That's because such a tutorial likely doesn't exist since you're asking for a tutorial that combines two distinct orthogonal concepts. Again, the details and code will likely need to come from *you*. Why not try creating this, using the knowledge that you have gained from the more specific tutorials? Then if your program doesn't work, come on back with your specific problems, and we can probably help you out. You've nothing to lose by trying this and much to gain.