Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #33861 > unrolled thread
| Started by | Eric Douglas <e.d.programmer@gmail.com> |
|---|---|
| First post | 2016-02-22 12:56 -0800 |
| Last post | 2016-02-22 20:52 -0500 |
| Articles | 5 — 3 participants |
Back to article view | Back to comp.lang.java.programmer
Where does the look and feel come from? Eric Douglas <e.d.programmer@gmail.com> - 2016-02-22 12:56 -0800
Re: Where does the look and feel come from? Sebastian <news@seyweiler.dyndns.org> - 2016-02-22 22:39 +0100
Re: Where does the look and feel come from? Eric Douglas <e.d.programmer@gmail.com> - 2016-02-22 13:54 -0800
Re: Where does the look and feel come from? Sebastian <news@seyweiler.dyndns.org> - 2016-02-22 23:24 +0100
Re: Where does the look and feel come from? Arne Vajhøj <arne@vajhoej.dk> - 2016-02-22 20:52 -0500
| From | Eric Douglas <e.d.programmer@gmail.com> |
|---|---|
| Date | 2016-02-22 12:56 -0800 |
| Subject | Where does the look and feel come from? |
| Message-ID | <ea4b3f5a-28b2-4cff-a2fc-ee7ac32c0c74@googlegroups.com> |
First, the javax.swing.UIManager.setLookAndFeel(), what is the default value if I don't call this method? Should this be the same on all systems running the same OS and/or the same JRE, or does this pull from something like Windows themes?
Second, where do the values come from, such as UIManager.get("CheckBox.icon") should this return the same image on 2 machines running the same OS and/or the same JRE with the same look and feel, or where would it get set?
[toc] | [next] | [standalone]
| From | Sebastian <news@seyweiler.dyndns.org> |
|---|---|
| Date | 2016-02-22 22:39 +0100 |
| Message-ID | <nafv6c$v15$1@news.albasani.net> |
| In reply to | #33861 |
Am 22.02.2016 21:56, schrieb Eric Douglas:
> First, the javax.swing.UIManager.setLookAndFeel(), what is the default value if I don't call this method? Should this be the same on all systems running the same OS and/or the same JRE, or does this pull from something like Windows themes?
>
> Second, where do the values come from, such as UIManager.get("CheckBox.icon") should this return the same image on 2 machines running the same OS and/or the same JRE with the same look and feel, or where would it get set?
>
https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html#steps
[toc] | [prev] | [next] | [standalone]
| From | Eric Douglas <e.d.programmer@gmail.com> |
|---|---|
| Date | 2016-02-22 13:54 -0800 |
| Message-ID | <84e29ed0-5c27-4ae7-8fdc-03bce48d858f@googlegroups.com> |
| In reply to | #33862 |
On Monday, February 22, 2016 at 4:39:38 PM UTC-5, Sebastian wrote: https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html#steps That's maybe half an answer. It says something about lookandfeel if not set by the application is a default value in a file, if I can find that file. It doesn't tell me where the checkbox icon comes from. How can I have 2 client machines with the same version of Windows running the same JRE displaying different checkboxes?
[toc] | [prev] | [next] | [standalone]
| From | Sebastian <news@seyweiler.dyndns.org> |
|---|---|
| Date | 2016-02-22 23:24 +0100 |
| Message-ID | <nag1q4$4fs$1@news.albasani.net> |
| In reply to | #33863 |
Am 22.02.2016 22:54, schrieb Eric Douglas: > On Monday, February 22, 2016 at 4:39:38 PM UTC-5, Sebastian wrote: > https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html#steps > > That's maybe half an answer. It says something about lookandfeel if not set by the application is a default value in a file, if I can find that file. It doesn't tell me where the checkbox icon comes from. How can I have 2 client machines with the same version of Windows running the same JRE displaying different checkboxes? > I'm by no means an expert on Swing. But I believe that look and feel may include OS-dependent resource names that make them sensitive to OS user settings for colors, fonts and even sounds. They may also differ a little between OS updates. So you'd have to be really sure you're running the very "same OS" on both those machines. -- Sebastian
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-02-22 20:52 -0500 |
| Message-ID | <nage12$tem$1@gioia.aioe.org> |
| In reply to | #33861 |
On 2/22/2016 3:56 PM, Eric Douglas wrote:
> First, the javax.swing.UIManager.setLookAndFeel(), what is the
> default value if I don't call this method?
https://docs.oracle.com/javase/8/docs/api/javax/swing/UIManager.html
says:
Default look and feel
The class used for the default look and feel is chosen in the following
manner:
1. If the system property swing.defaultlaf is non-null, use its value
as the default look and feel class name.
2. If the Properties file swing.properties exists and contains the
key swing.defaultlaf, use its value as the default look and feel class
name. The location that is checked for swing.properties may vary
depending upon the implementation of the Java platform. Typically the
swing.properties file is located in the lib subdirectory of the Java
installation directory. Refer to the release notes of the implementation
being used for further details.
3. Otherwise use the cross platform look and feel.
> Should this be the same
> on all systems running the same OS and/or the same JRE, or does this
> pull from something like Windows themes?
It depends on the look and feel.
The name "cross platform look and feel" seems to indicate that
it should be similar across anything.
The documentation:
https://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/metal/MetalLookAndFeel.html
sort of confirms that.
> Second, where do the values come from, such as
> UIManager.get("CheckBox.icon") should this return the same image on 2
> machines running the same OS and/or the same JRE with the same look
> and feel,
I have never played with that.
I would expect that the answer is look and feel specific.
I would expect that Metal would be the same anywhere but
that the system default would change with the OS setting.
Expect = I don't know and are just guessing.
> or where would it get set?
The look and feel could probably get the information from a config file
or a database if it wanted to.
It can also be set with the put method! :-)
Arne
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web