Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Tom Newsgroups: comp.lang.java.gui Subject: Re: Label clipping using Nimbus L&F Date: Sat, 20 Aug 2011 11:07:30 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 33 Message-ID: References: NNTP-Posting-Host: Vd3zjYYo2heJAT9ZVcrkiA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Pan/0.133 (House of Butterflies) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:4654 On Fri, 19 Aug 2011 17:11:17 -0700, Roedy Green wrote: > On Fri, 19 Aug 2011 13:30:14 -0700 (PDT), Fred > wrote, quoted or indirectly quoted > someone who said : > >>When I use Nimbus Look-and-feel, often the text in a JLabel, JButton, or >>JToggleButton will be partially clipped. This does not happen with Metal >>or Motif. >>Any suggestions how to solve this? > > > > see http://mindprod.com/jgloss/jlabel.html > > The trick is to use an empty border to put a little padding around the > text that will suffice for all the different LAFs you use. > > A related problem is that different type faces 10 point font vary > considerably in size. I work out adjustment factors for all possible > fonts. Well whatever works but if I'm on the right lines then the OP's problem relates to an inadequate GUI layout that does not allow components to assume their preferred size (even if they are subsequently not supposed to be resizeable). If changes in L&F (or even just default font sizes) mean that things then get clipped probably their containers are preventing them from being big enough. Cue layout discussions, use of TableLayout etc http://www.clearthought.info/sun/products/jfc/tsc/articles/tablelayout/index.html