Article View: pl.comp.lang.java
Article #141753Re: przykład aplikacji bazodanowej bez drag and drop ale z JPA, EntityManager, binding, swing
From: Wito
Date: Wed, 22 Oct 2008 12:49
Date: Wed, 22 Oct 2008 12:49
31 lines
2347 bytes
2347 bytes
On 17 Paź, 10:01, Maciej Bodus <asd...@onet.pl> wrote:
> Wito pisze:
>
>
>
> > Mam doświadczenie w pisaniu aplikacji bazodanowych w Delphi i dlatego
> > dziwi mnie że zmiana źródła danych nie powoduje automatycznie zmiany
> > widoku tabeli.
>
> zmieniłeś model, a robisz repaint() o ile dobrze pamiętam.
>
> > Bardzo proszę o linki do źródła kompletnych aplikacji bazodanowych lub
> > namiary rozwiązujące problem.
>
> http://en.wikipedia.org/wiki/Model-view-controller#Java:_Java_Swing
>
> http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
>
> pozdrawiam
> Maciej
Juz znalazłem roziwązanie
TableModel model = (TableModel) jTable1.getModel();
tDzialyList.clear();
tDzialyQuery =
entityManager.createNamedQuery("TDzialy.findByFIdI");
tDzialyList.addAll(tDzialyQuery.getResultList());
jTable1.setModel(model);
jTable1.repaint();
Technical Details
Message-ID:
<ed173cf3-3e1c-44cf-be27-50b1910b46e5@y29g2000hsf.googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!news.task.gda.pl!newsfeed00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!y29g2000hsf.googlegroups.com!not-for-mailReferences:
<de0139c7-f802-405a-aa51-9cbce1fd8b32@k16g2000hsf.googlegroups.com> <gd9grg$au0$1@sunflower.man.poznan.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!news.task.gda.pl!newsfeed00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!y29g2000hsf.googlegroups.com!not-for-mail From: Wito <wolewniczak@gmail.com> Newsgroups: pl.comp.lang.java Subject: Re: przykład aplikacji bazodanowej bez drag and drop ale z JPA, EntityManager, binding, swing Date: Wed, 22 Oct 2008 05:49:22 -0700 (PDT) Organization: http://groups.google.com Lines: 33 Message-ID: <ed173cf3-3e1c-44cf-be27-50b1910b46e5@y29g2000hsf.googlegroups.com> References: <de0139c7-f802-405a-aa51-9cbce1fd8b32@k16g2000hsf.googlegroups.com> <gd9grg$au0$1@sunflower.man.poznan.pl> NNTP-Posting-Host: 217.97.198.98 Mime-Version: 1.0 X-Trace: posting.google.com 1224679762 17973 127.0.0.1 (22 Oct 2008 12:49:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 22 Oct 2008 12:49:22 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y29g2000hsf.googlegroups.com; posting-host=217.97.198.98; posting-account=V5sjawkAAAAQlMmPYs5SKVG1iccFBIqI User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 Serwer_proxy_POSD_ODG_w_Olsztynie:8080 (squid/2.6.STABLE18) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit