Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3884

Re: Left justified text

From "Hakan" <hakan@THRWHITE.remove-dii-this>
Subject Re: Left justified text
Message-ID <1217859320.64@user.newsoffice.de> (permalink)
Newsgroups comp.lang.java.gui
References <489694b0$0$4010$b9f67a60@news.newsdemon.com>
Date 2011-04-27 15:47 +0000
Organization TDS.net

Show all headers | View raw


  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

Back to comp.lang.java.gui | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Left justified text "Hakan" <hakan@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
  Re: Left justified text "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
  Re: Left justified text "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000

csiph-web