Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #18181
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Eric Sosman <esosman@ieee-dot-org.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: How to remove line around label image |
| Date | Mon, 20 Aug 2012 14:16:20 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 33 |
| Message-ID | <k0tuts$7oa$1@dont-email.me> (permalink) |
| References | <824fad70-20cf-4b77-a9f1-296f6f1b8449@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Mon, 20 Aug 2012 18:16:28 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="ffb8f7085759b339c1002252b48331a4"; logging-data="7946"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EaZPd0Te2ENdegwPqduL0" |
| User-Agent | Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 |
| In-Reply-To | <824fad70-20cf-4b77-a9f1-296f6f1b8449@googlegroups.com> |
| Cancel-Lock | sha1:7qtHUaFG3W7AZZK9bBQMziNdTs4= |
| Xref | csiph.com comp.lang.java.programmer:18181 |
Show key headers only | View raw
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
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
How to remove line around label image clusardi2k@aol.com - 2012-08-20 10:18 -0700
Re: How to remove line around label image Knute Johnson <nospam@knutejohnson.com> - 2012-08-20 11:09 -0700
Re: How to remove line around label image clusardi2k@aol.com - 2012-08-20 12:11 -0700
Re: How to remove line around label image Knute Johnson <nospam@knutejohnson.com> - 2012-08-20 13:14 -0700
Re: How to remove line around label image clusardi2k@aol.com - 2012-08-21 05:28 -0700
Re: How to remove line around label image Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-21 09:16 -0400
Re: How to remove line around label image clusardi2k@aol.com - 2012-08-21 10:49 -0700
Re: How to remove line around label image Knute Johnson <nospam@knutejohnson.com> - 2012-08-21 08:34 -0700
Re: How to remove line around label image Knute Johnson <nospam@knutejohnson.com> - 2012-08-20 13:20 -0700
Re: How to remove line around label image Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-20 14:16 -0400
csiph-web