• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Obtain and display total records in a JLabel

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.




bs.jpg
[Thumbnail for bs.jpg]
How to GUI should look like
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic