Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-xxxfer.readnews.com!textspool1.readnews.com!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "Hakan" Subject: Re: Left justified text Message-ID: <1217859320.64@user.newsoffice.de> X-Comment-To: comp.lang.java.gui Newsgroups: comp.lang.java.gui In-Reply-To: <489694b0$0$4010$b9f67a60@news.newsdemon.com> References: <489694b0$0$4010$b9f67a60@news.newsdemon.com> Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] Lines: 48 Date: Wed, 27 Apr 2011 15:47:30 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303919250 96.60.20.240 (Wed, 27 Apr 2011 10:47:30 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:47:30 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:3884 To: comp.lang.java.gui Knute Johnson wrote: > Hakan wrote: > Is it a right to left box? Left alignment in a horizontal box appears > to be the default. > import java.awt.*; > import java.awt.event.*; > import javax.swing.*; > public class test { > public static void main(String[] args) { > EventQueue.invokeLater(new Runnable() { > public void run() { > JFrame f = new JFrame(); > f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); > Box b = Box.createHorizontalBox(); > b.add(new JLabel("JLabel")); > f.add(b,BorderLayout.CENTER); > f.pack(); > f.setVisible(true); > } > }); > } Thanks for that. I should have mentioned that the horizontal box is located in a frame just above a table. The text seems to automatically center so that it ends up in the middle above the first row. Is there a way to mitigate that? I have tried with different types of layout approaches. > } -- Newsoffice.de - Die Onlinesoftware zum Lesen und Schreiben im Usenet Die Signatur lE#t sich nach Belieben anpassen ;-) --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24