Re: Java Gui for Postgress

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Java Gui for Postgress
Дата
Msg-id 4A1B6E3F.8070405@postnewspapers.com.au
обсуждение исходный текст
Ответ на Java Gui for Postgress  (queries <michaelkni@hotmail.com>)
Ответы Re: Java Gui for Postgress  (queries <michaelkni@hotmail.com>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: do postgresql this job for me ? (firebird user)
Следующее
От: iSTRONG
Дата:
Сообщение: Re: PGS Tuning Wizard destroys my login