• Post Reply Bookmark Topic Watch Topic
  • New Topic

Obtain and display total records in a JLabel  RSS feed

Eli Kook
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
My task as a homework project is to add a label to Gui (sql data base, data table) to total records (Datensatz 1 von 2).
The first part was to obtain the number of the actual record which I have achieved via method getRow() in ResultSet (In the code it is calld ergebnisMenge in German).
I have created the JLabel and called it datensatz.
The part that I do not know is how to achieve the total records and combine it in the code.
From what I found in researching in the Internet, I need to execute Query SELECT COUNT (*) FROM adressen but how do I combine it within the following code and display it as a Label?

Thanks in advance for any useful information, please note that it will be better way more helpful if you add some pseudocode or example since I am a beginner and get lost with the technical stuff.

[Thumbnail for bs.jpg]
How to GUI should look like
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!