Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #5462
| X-Received | by 10.236.17.168 with SMTP id j28mr227593yhj.0.1425406196440; Tue, 03 Mar 2015 10:09:56 -0800 (PST) |
|---|---|
| X-Received | by 10.50.225.37 with SMTP id rh5mr430249igc.1.1425406196259; Tue, 03 Mar 2015 10:09:56 -0800 (PST) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!j7no10575069qaq.1!news-out.google.com!qk8ni45613igc.0!nntp.google.com!hl2no3503949igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.java.gui |
| Date | Tue, 3 Mar 2015 10:09:55 -0800 (PST) |
| In-Reply-To | <md29f1$vff$1@dont-email.me> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=130.76.32.213; posting-account=_7xgmwoAAADi7iXKBO-oX5zbCfSzsCV0 |
| NNTP-Posting-Host | 130.76.32.213 |
| References | <md29f1$vff$1@dont-email.me> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <19661bb3-8dd6-4da4-b745-4ef4e7c04a35@googlegroups.com> (permalink) |
| Subject | Re: LookAndFeel on Windows 8? |
| From | FredK <fred.l.kleinschmidt@gmail.com> |
| Injection-Date | Tue, 03 Mar 2015 18:09:56 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Received-Bytes | 2575 |
| X-Received-Body-CRC | 413252246 |
| Xref | csiph.com comp.lang.java.gui:5462 |
Show key headers only | View raw
On Monday, March 2, 2015 at 10:17:50 AM UTC-8, Knute Johnson wrote:
> I'm having a problem getting my JFrame to change LookAndFeel. No matter
> what I set it to the outside of the frame always looks the same. If I
> change the LAF to Motif the color of the inside of the frame changes but
> not the frame decorations themselves. Windows 8.1, Java 8u31.
>
> Any ideas?
>
>
> import java.awt.*;
> import java.awt.event.*;
> import java.util.*;
> import javax.swing.*;
>
> public class test {
> static Map<String,String> map = new HashMap<>();
>
> public static void main(String... args) {
> for (UIManager.LookAndFeelInfo info :
> UIManager.getInstalledLookAndFeels()) {
> map.put(info.getName(),info.getClassName());
> System.out.println(info.getName());
> }
>
> EventQueue.invokeLater(() -> {
> try {
> UIManager.setLookAndFeel(map.get("Nimbus"));
> } catch (Exception e) {
> e.printStackTrace();
> }
> JFrame f = new JFrame();
> f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
> f.setSize(400,300);
> f.setVisible(true);
> });
> }
> }
>
>
It has been my experience that the frame decorations are added by
the window manager, not by java. So you get whatever decorations
are native to the WM, regardless of what L&F you specify.
--
Fred K
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar
LookAndFeel on Windows 8? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2015-03-02 10:18 -0800
Re: LookAndFeel on Windows 8? FredK <fred.l.kleinschmidt@gmail.com> - 2015-03-03 10:09 -0800
Re: LookAndFeel on Windows 8? Joerg Meier <joergmmeier@arcor.de> - 2015-03-03 19:33 +0100
Re: LookAndFeel on Windows 8? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2015-03-03 16:29 -0800
csiph-web