I've put together an application, swing and sql, which uses a MySQL database to store images as BLOBS and a swing gui to load and view them. Currently, the blobs in the sql database are loaded and added to an icon, which is then added to a label using,
The user queries the database using a textfield and a button, which then returns the required image as a label within a panel. All of this works fine, but each time a user enters a query into the textfield, eg: House, the button returns only the icon for that label. It effectively removes the previous label. Only one label can be shown on the panel at any time.
Therefore, what would be the best way to preserve previous labels on the panel, and add more than one label/query to the panel. Basically, I want to be able to show more than one image from the database within the panel, instead of currently only the most recent search query.
Would some sort of array or vector etc work with this problem?
Any ideas or advice would be really appreciated.