Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #18251
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-in-01.newsfeed.easynews.com!easynews.com!easynews!news-out.news.tds.net!newsreading01.news.tds.net!53ab2750!not-for-mail |
|---|---|
| From | "Eric Sosman" <eric.sosman@1:261/38.remove-z93-this> |
| Subject | Re: How to remove line around label image |
| Message-ID | <50328B19.57176.calajapr@time.synchro.net> (permalink) |
| X-Comment-To | clusardi2k |
| Newsgroups | comp.lang.java.programmer |
| In-Reply-To | <50327C3E.57172.calajapr@time.synchro.net> |
| References | <50327C3E.57172.calajapr@time.synchro.net> |
| X-FTN-AREA | COMP.LANG.JAVA.PROGRAMMER |
| X-FTN-MSGID | 1:261/38 a64a625c |
| X-FTN-REPLY | 1:261/38 7f43ffe9 |
| Content-Type | text/plain; charset=IBM437 |
| Content-Transfer-Encoding | 8bit |
| X-Gateway | time.synchro.net [Synchronet 3.16a-Win32 NewsLink 1.98] |
| Lines | 43 |
| Date | Mon, 20 Aug 2012 20:01:03 GMT |
| NNTP-Posting-Host | 69.21.70.65 |
| X-Complaints-To | news@tds.net |
| X-Trace | newsreading01.news.tds.net 1345492863 69.21.70.65 (Mon, 20 Aug 2012 15:01:03 CDT) |
| NNTP-Posting-Date | Mon, 20 Aug 2012 15:01:03 CDT |
| Organization | tds.net |
| X-Received-Bytes | 2291 |
| Xref | csiph.com comp.lang.java.programmer:18251 |
Show key headers only | View raw
To: clusardi2k
From: Eric Sosman <esosman@ieee-dot-org.invalid>
On 8/20/2012 1:18 PM, clusardi2k@aol.com wrote:
> How do I remove a line around a label image. I set the background and
foreground color to the panel color and put a check in the property opaque
checkbox.
>
> Thank you,
>
If you're sure the line is not part of the image itself (a border, perhaps),
please post an SSSCE. This works fine for me:
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingUtilities;
public class Foo {
public static void main(String[] unused) {
SwingUtilities.invokeLater(new Runnable(){
@Override
public void run() {
JFrame frame = new JFrame("Foo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ImageIcon icon = new ImageIcon("icon.jpg");
frame.add(new JLabel(icon));
frame.pack();
frame.setVisible(true);
}
});
}
}
--
Eric Sosman
esosman@ieee-dot-org.invalid
--- BBBS/Li6 v4.10 Dada-1
* Origin: Prism bbs (1:261/38)
--- Synchronet 3.16a-Win32 NewsLink 1.98
Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
How to remove line around label image "clusardi2k" <clusardi2k@1:261/38.remove-fzq-this> - 2012-08-20 18:58 +0000 Re: How to remove line around label image "Knute Johnson" <knute.johnson@1:261/38.remove-z93-this> - 2012-08-20 20:01 +0000 Re: How to remove line around label image "Eric Sosman" <eric.sosman@1:261/38.remove-z93-this> - 2012-08-20 20:01 +0000
csiph-web