Article View: pl.comp.lang.java
Article #154073Re: Jakiego layoutu użyć?
From: Michal Kleczek
Date: Tue, 15 Jul 2014 16:46
Date: Tue, 15 Jul 2014 16:46
22 lines
1730 bytes
1730 bytes
Borneq wrote:
> Chciałbym mieć tak jak w Delphi - formę, na niej w pewnym miejscu
> button, gdzie indziej pole tekstowe. Użyłem BoxLayout:
> button = new JButton();
> panel = new JPanel();
> panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));
> this.add(panel);
> button.setSize(new Dimension(100,100)); //to nic nie robi
> button.setText("Test");
> panel.add(button);
> textArea = new JTextArea();
> panel.add(textArea);
> panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
>
> Mam u góry po lewo button, resztę zajmuje pole tekstowe, jednak gdy coś
> piszę, to button się przesuwa.
Czyżby interesowal Cie AbsoluteLayout?
--
Michal
Technical Details
Message-ID:
<53c55af8$0$2145$65785112@news.neostrada.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!news.nask.pl!news.nask.org.pl!newsfeed.pionier.net.pl!feeder.erje.net!eu.feeder.erje.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-b-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mailReferences:
<lq00j8$tcp$1@node2.news.atman.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!news.nask.pl!news.nask.org.pl!newsfeed.pionier.net.pl!feeder.erje.net!eu.feeder.erje.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-b-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail From: Michal Kleczek <michal_wytnijto@kleczek.org> Date: Tue, 15 Jul 2014 18:46:48 +0200 User-Agent: KNode/4.13.2 Subject: Re: Jakiego layoutu użyć? Newsgroups: pl.comp.lang.java References: <lq00j8$tcp$1@node2.news.atman.pl> MIME-Version: 1.0 Lines: 22 Message-ID: <53c55af8$0$2145$65785112@news.neostrada.pl> Organization: Telekomunikacja Polska NNTP-Posting-Host: host-31-6-135-215.dynamic.mm.pl X-Trace: 1405442809 unt-rea-a-02.news.neostrada.pl 2145 31.6.135.215:59945 X-Complaints-To: abuse@news.neostrada.pl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit