It seems that rs.getString("image")
is returning a non valid path to a file. You can easily check this:
//btnNewButton.setIcon(new ImageIcon(rs.getString("image")));
System.out.println(rs.getString("image"));
Some Tips
Database calls are time consuming tasks and may block the Event Dispatch Thread (a.k.a. EDT) causing the GUI become unresponsive. The EDT is a single and special thread where Swing components creation and update take place. To avoid block this thread consider use a SwingWorker to perform database calls in a background thread and update Swing components in the EDT. See more in Concurrency in Swing trail.
I'd suggest you take a look to the hints exposed in this answer. Summarized:
- Wrap data in a domain class.
- Use a SwingWorker to do the database calls in a background thread and update Swing components in the EDT.