From: | Dave Cramer <davecramer(at)postgres(dot)rocks> |
---|---|
To: | Jian He <hejian(dot)mark(at)gmail(dot)com> |
Cc: | pgsql-jdbc(at)lists(dot)postgresql(dot)org |
Subject: | Re: JDBC update changes to JTable. |
Date: | 2021-06-28 14:08:48 |
Message-ID: | CADK3HHK4_-zofx_smuqvjCKVtbRg+Nepes9OJAAF1GUkd0e31Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi Jian,
I'm not exactly sure what you are asking here.
One way is to use logical replication in Postgres.
Dave Cramer
www.postgres.rocks
On Sun, 27 Jun 2021 at 04:12, Jian He <hejian(dot)mark(at)gmail(dot)com> wrote:
> So far what I have been wondering:
>
> - I have somehow finished the beginner level of JTable step by step
> following the official tutorial.
> - I know how to use JDBC to query/update/ delete PostgreSQL database
> records.
> - Add a button to update and insert and delete database table.
>
> After using *select *syntax to populate JTable, I wonder how to update
> changes made in JTable to the database.
> After browsing StackOverFlow, I have some basic idea:
>
> - Step 1: editing
> - step 2: stop editing;
> - Step 3: make the update sync with the database.
>
> Step1 is about adjusting the DefaultTableModel by calling related methods
> as per requirement. Related link: DefaultTableModel (Java Platform SE 7 )
> (oracle.com)
> <https://docs.oracle.com/javase/7/docs/api/javax/swing/table/DefaultTableModel.html>
>
> Step2: I copied from StackOverFlow (
> https://stackoverflow.com/questions/12823475/what-is-the-best-way-to-listen-for-changes-in-jtable-cell-values-and-update-data
> )
>
> Step3: I don't know how to do it. So I asked the question on
> StackOverFlow (java - Update changes In JTable to database? - Stack
> Overflow
> <https://stackoverflow.com/questions/68149156/update-changes-in-jtable-to-database>)
> If you guys know how to do it, please help me.
>
> I know it's less about JDBC, more about Java. Anyway.................
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Prasanth | 2021-06-28 14:12:05 | Re: Exception while updating result set |
Previous Message | Sehrope Sarkuni | 2021-06-27 20:20:52 | [pgjdbc/pgjdbc] 022f1c: test: Change test TLS cert generation to have ten ... |