Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: clusardi2k@aol.com Newsgroups: comp.lang.java.programmer Subject: Re: How to remove line around label image Date: Mon, 20 Aug 2012 12:11:03 -0700 (PDT) Organization: http://groups.google.com Lines: 84 Message-ID: <85bbe4c1-ffc8-405f-9fb5-53fb05e4941a@googlegroups.com> References: <824fad70-20cf-4b77-a9f1-296f6f1b8449@googlegroups.com> NNTP-Posting-Host: 198.151.13.60 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1345489863 17615 127.0.0.1 (20 Aug 2012 19:11:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 20 Aug 2012 19:11:03 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=198.151.13.60; posting-account=r24XpwkAAABfAJg5TJRsTScS4AL5MjOT User-Agent: G2/1.0 Xref: csiph.com comp.lang.java.programmer:18248 > On Monday, August 20, 2012 2:09:26 PM UTC-4, Knute Johnson wrote: > We need to see some code. I don't see the problem you describe in the code > below. Are you using AWT? Here is code that yields a tiny line around the image. public class Line extends javax.swing.JFrame { public Line() { initComponents(); } @SuppressWarnings("unchecked") // private void initComponents() { jLabel1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(51, 0, 153)); setForeground(java.awt.Color.orange); jLabel1.setText("Remove Tiny Line"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(149, 149, 149) .addComponent(jLabel1) .addContainerGap(150, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(116, 116, 116) .addComponent(jLabel1) .addContainerGap(168, Short.MAX_VALUE)) ); pack(); }// public static void main(String args[]) { try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Line.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Line.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Line.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Line.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Line().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JLabel jLabel1; // End of variables declaration }