Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3884 > unrolled thread
| Started by | "Hakan" <hakan@THRWHITE.remove-dii-this> |
|---|---|
| First post | 2011-04-27 15:47 +0000 |
| Last post | 2011-04-27 15:47 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.java.gui
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
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
| From | "Hakan" <hakan@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:47 +0000 |
| Subject | Re: Left justified text |
| Message-ID | <1217859320.64@user.newsoffice.de> |
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
[toc] | [next] | [standalone]
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:47 +0000 |
| Message-ID | <69ddaebe-0bcb-4907-bd1b-3b5f833c7897@w1g2000prk.googlegroups.com> |
| In reply to | #3884 |
To: comp.lang.java.gui On Aug 5, 12:15 am, Hakan <H...@softhome.net> wrote: > Knute Johnson wrote: > > Hakan wrote: > > Is it a right to left box? Left alignment in a horizontal box appears > > to be the default. ..Trimmed SSCCE*.. > > } > > Thanks for that. I should have mentioned ... ..no. I disagree. I think the best way forward is to trim your code down to an SSCCE* and post the SSCCE*. Let the code, do the talkin'. * <http://pscode.org/sscce.html> -- Andrew Thompson http://pscode.org/ --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:47 +0000 |
| Message-ID | <nospam-92728A.10301004082008@aioe.org> |
| In reply to | #3884 |
To: comp.lang.java.gui
In article <1217859320.64@user.newsoffice.de>, Hakan <H.L@softhome.net>
wrote:
> 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.
I have verified that Knute's code produces the expected output on my
implementation. Can you post an sscce <http://sscce.org/> that displays
the behavior you describe?
--
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews
---
* 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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.gui
csiph-web