Re: Java Gui for Postgress

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: queries <michaelkni(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Java Gui for Postgress
Date: 2009-05-26 04:21:19
Message-ID: 4A1B6E3F.8070405@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

queries wrote:
> Hi Everyone,
>
> I need to build a simple gui front end with jdbc access to my Postgres
> database. I have the front end ready and I have some code which retrieves
> records from my database, but for some reason I keep on getting errors
> (lately just freezes without errors) when I apply that same code to the
> buttons on my gui. It's definitely me doing something stupid because I have
> 0% knowledge in java. Can anyone help?

This looks a lot like a uni assignment:

> Class.forName("org.postgresql.Driver"); // Remeber Last Lecture?

For your "freeze" problems: run it under the debugger in netbeans. When
it "freezes", pause execution and look at the event dispatch thread
(EDT); see what it's doing and what it's waiting for.

You really haven't provided enough information, or complete enough code,
to give you more of an answer. What GUI? I don't see anything GUI
related in the code you posted.

I'm not sure this is relevant to you, but as general advice: Make sure
you never do anything affecting the GUI from any thread except the event
dispatch thread. Ever. Use deferred tasks (ref: SwingTask, Runnable,
etc) if possible, or use typical thread synchronization mechanisms.

--
Craig Ringer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message queries 2009-05-26 04:55:28 Re: Java Gui for Postgress
Previous Message Craig Ringer 2009-05-26 04:08:23 Re: do postgresql this job for me ? (firebird user)