Skip to main content

Create or display the number of rows of data or with java NetBeans and MySQL

Or it could be called a number of recordings in the table or database.
than confused , see the following picture :




In the red circle that's what I mean , and maybe you are too , just to deliver it that hard? it's okay , here's how to make it :
1.Open the Netbeans software, then your project , then the form will be given record .
2.Add two labels , the first label given text " Record : " , then the label text to the two given numbers " 0 " . VIEW IMAGES were given a red circle and arrow !
 
 
it is the result of counting the number of rows of data that has been fed , note the contents of the table ! In the table only contains 3 data, the Record : 3 , and when the input data is again Record 1 to 3 + 1 so the Record : 4. so right ????
3.On the label " Record : " do right click - select variable name change - given the name " record " . Then the label " 0 " also please do right click - select variable name change - and give it the name " LCountPtg "


4.Back to the Source tab , find the display source code class that is used to invoke the data from the database to the JTable , then add image coding as already circled in red . examples display the source code as follows :
5.Only the coding used for showing the number of rows of data that has been entered and shown to JTable . Easy right ??? it is not difficult to learn if we want to try looking for references .Trying to do storage , and then try to run the program and see the results .


6.Note the difference with the picture earlier, in this picture has been entered new data in line 4 ,
Download Source code in here!
Happy coding :D

Comments

Popular posts from this blog

Contoh Analisis dan Perancangan Sistem Informasi Klinik atau Rumah Sakit (Diagram Konteks, DFD/DAD, Flowchart System)

Assalamu'alaikum... Mencoba berbagi lagi, irna pengen bahas tentang bagaimana merancang sistem (analisys system) pembuatan sebuah Sistem Informasi Klinik atau bisa juga Rumah Sakit tapi dalam lingkup kecil. Yang mau irna bahas dari pembuatan Diagram Konteks, Data Flow Diagram (DFD) atau Diagram Alir Data (DAD) dari level 1 sampai level 3 dan Flowchart System nya. Yupzt berikut hasil screen shoot gambar-gambarnya : >> Diagram Konteks atau Kontext Diagram Sistem Informasi Klinik atau Rumah Sakit : >> DFD (Data Flow Diagram) atau DAD (Diagram Alir Sistem Sistem) Level 1 Sistem Informasi Klinik atau Rumah Sakit : >> DFD (Data Flow Diagram) atau DAD (Diagram Alir Sistem Sistem) Level 2 Input Data Sistem Informasi Klinik atau Rumah Sakit : >> DFD (Data Flow Diagram) atau DAD (Diagram Alir Sistem Sistem) Level 2 Proses atau Transaksi Sistem Informasi Klinik atau Rumah Sakit : >> DFD (Data Flow Diagram) atau DAD (Diagram Ali...

Membuat Login Multiuser atau Multi Level User (berbeda hak akses) Java Dekstop

Bismillah.. Dalam pembuatan system, terutama yang berbasis client-server tentu nya hak akses setiap petugas berbeda, oleh karena itu dibutuhkan login yang multiuser atau multi level user. Berikut langkah-langkah pembuatannya pada pemrograman java desktop NetBeans IDE.   1.       Design tampilan form utama seperti pada gambar di bawah : #Sub menu Login akan berubah otomatis menjadi Logout ketika Login sudah berhasil. #semua tombol/button tidak aktif (enable=false). 2.         Buat sebuah database (saya menggunakan MySQL), berikut contoh struktur database untuk table admin nya : 3.         Jangan lupa Add Library MySQL JDBC Driver nya, caranya tinggal klik kanan pada Libraries > Pilih Add Library sehinggan muncul tampilan berikut : Jika MySQL JDBC Driver nya belum ada, klik tombol Import dan cari file MySQL JDBC Driver nya kemudian pilih filenya lalu tekan Ok. Se...

Source Code Program Sistem Informasi Rekam Medis Pada KLinik Rawat Jalan Berbasis Java Web (JSP, Servlet, JSTL)

Bismillah... Mencoba lagi meskipun masih sederhana.. Source code program ini menggunakan Netbeans 7.2 berbasis java web (JSP, JSTL, Servlet) dan menggunakan perintah SQL inner join untuk mempermudah User dalam menggunakan sistem/aplikasi ini. Bisa melakukan simpan, edit, hapus dan pencarian data. Design web nya menggunakan bahasa HTML dan CSS. Berikut hasil screen shoot tampilan program setelah di Run di Google Chrome : 1. Tampilan Home/Beranda ketika pertama kali di Run. 2. Tentang Program (Tampilan yang muncul ketika klik Menu About.) 3. Input Data Obat (tampilan ketika menu Obat di klik) 4. Input Data Dokter (tampilan ketika menu Dokter di klik) 5. Input Data Petugas (tampilan ketika menu Petugas di klik) 6. Input Data Pasien (tampilan ketika menu Pasien di klik) 7. Input Data Tarif Tindakan (tampilan ketika menu Tarif Tindakan di klik) 8. Input Data Pemberian Obat (tampilan ketika menu Pemberian Obat di klik)     Berrelasi dengan tabel Obat...