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


Groups > comp.lang.java.gui > #2077 > unrolled thread

Re: to make text compact

Started by"Lew" <lew@THRWHITE.remove-dii-this>
First post2011-04-27 15:37 +0000
Last post2011-04-27 15:37 +0000
Articles 2 — 2 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.


Contents

  Re: to make text compact "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
    Re: to make text compact "Ray Ma" <ray.ma@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000

#2077 — Re: to make text compact

From"Lew" <lew@THRWHITE.remove-dii-this>
Date2011-04-27 15:37 +0000
SubjectRe: to make text compact
Message-ID<m82dnaAz5a6X6QPbnZ2dnUVZ_gWdnZ2d@comcast.com>
  To: comp.lang.java.gui
Ray Ma wrote:
> Hi,
> 
> I hope to make the text on the JButton compact. This is comparable to
> set the "internal margin" attribute for a Text box in the Microsoft
> WORD. The default margin is none zero. If you set one of the left/
> right/top/bottom to be zero, a little more text can be displayed in
> one line/column when the Text box size is not changed.
> 
> I didn't find where can I set this for the JButton. The JTextComponent
> has a "setMargin(Insets m) " method to achieve this. But JButton is
> not a subclass of JTextComponent. JButton has setFont() method, but
> font attribute doesn't seem to deal with the text line margin. Font
> class itself has "getLineMetrics()". I guess it's related but there's
> no "setLineMetrics" so that I can set the internal text margin.
> 
> Currently, my Button has to be certain large to display its default
> font-size (12, Times new roman) text. If I shrink the button, text
> will be "..." but the total button size is actually enough to display
> the text, if I can set the line' left and right margin =0; Besides, I
> must use "center" alignment for the text.
> 
> Anyone has idea?

See Knute Johnson's post on this question the first time it went up.

-- 
Lew

---
 * 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]


#2091

From"Ray Ma" <ray.ma@THRWHITE.remove-dii-this>
Date2011-04-27 15:37 +0000
Message-ID<1184877643.673416.236320@e16g2000pri.googlegroups.com>
In reply to#2077
  To: comp.lang.java.gui

> See Knute Johnson's post on this question the first time it went up.
>
> --
> Lew

Sorry my browser somehow doesn't refresh so I duplicate post.

---
 * 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