Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35915 > unrolled thread
| Started by | Knute Johnson <nospam@rabbitbrush.frazmtn.com> |
|---|---|
| First post | 2016-11-21 11:06 -0600 |
| Last post | 2016-11-27 16:42 -0800 |
| Articles | 20 on this page of 92 — 13 participants |
Back to article view | Back to comp.lang.java.programmer
Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-21 11:06 -0600
Re: Scaling java app Martin Gregorie <martin@address-in-sig.invalid> - 2016-11-21 19:48 +0000
Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-21 12:33 -0800
Re: Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-21 18:23 -0600
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-21 21:22 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-21 21:25 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-21 22:29 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-21 22:41 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-22 10:51 -0500
Re: Scaling java app a.laforgia@gmail.com - 2016-11-23 04:58 -0800
Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-23 05:18 -0800
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 09:52 -0500
Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-23 07:51 -0800
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 09:46 -0500
Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-23 08:07 -0800
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 12:10 -0500
Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-23 10:39 -0800
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 14:57 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-23 15:04 -0500
Re: Scaling java app a.laforgia@gmail.com - 2016-11-24 02:01 -0800
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-24 09:10 -0500
Re: Scaling java app a.laforgia@gmail.com - 2016-11-25 03:48 -0800
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-25 09:58 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-25 10:22 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-25 10:34 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-26 00:01 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-26 09:05 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-26 09:52 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-21 19:46 -0500
Re: Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-21 21:12 -0600
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-21 22:44 -0500
Re: Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-22 09:56 -0600
Re: Scaling java app Silvio <silvio@internet.com> - 2016-11-22 20:07 +0100
Re: Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-22 18:00 -0600
Re: Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-22 19:35 -0600
Re: Scaling java app Silvio <silvio@internet.com> - 2016-11-24 00:51 +0100
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 10:26 -0500
Re: Scaling java app Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-11-23 15:54 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 20:46 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 12:00 -0500
Re: Scaling java app Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-11-23 19:53 -0600
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 21:21 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-23 21:34 -0500
Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-28 05:06 -0800
Re: Scaling java app Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2016-11-24 20:45 +0800
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-24 09:12 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-25 10:32 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-26 00:05 -0500
Re: Scaling java app Martin Gregorie <martin@address-in-sig.invalid> - 2016-11-26 15:24 +0000
Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-11-28 05:08 -0800
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-28 19:51 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-28 21:18 -0500
Re: Scaling java app lewbloch@gmail.com - 2016-11-29 13:50 -0800
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-29 16:53 -0500
Re: Scaling java app lewbloch@gmail.com - 2016-12-01 13:27 -0800
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-01 16:45 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-01 22:07 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 10:35 -0500
Re: Scaling java app Gene Wirchenko <genew@telus.net> - 2016-12-02 08:53 -0800
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 15:05 -0500
Re: Scaling java app Martin Gregorie <martin@address-in-sig.invalid> - 2016-12-02 20:25 +0000
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 16:20 -0500
Re: Scaling java app Martin Gregorie <martin@address-in-sig.invalid> - 2016-12-02 18:33 +0000
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 15:16 -0500
Re: Scaling java app Martin Gregorie <martin@address-in-sig.invalid> - 2016-12-02 22:57 +0000
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 19:25 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 22:18 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 22:28 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 22:36 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-03 11:27 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 22:05 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 22:30 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 22:41 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-03 11:29 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 22:00 -0500
Re: Scaling java app lewbloch@gmail.com - 2016-12-02 11:40 -0800
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 15:17 -0500
Re: Scaling java app lewbloch@gmail.com - 2016-12-02 16:26 -0800
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 20:46 -0500
Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-12-02 12:44 -0800
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 21:57 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 22:40 -0500
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 22:51 -0500
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-03 11:42 -0500
Re: Scaling java app Andreas Leitgeb <avl@logic.at> - 2016-12-02 15:43 +0000
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-12-02 21:19 -0500
Re: Scaling java app Martin Gregorie <martin@address-in-sig.invalid> - 2016-12-02 10:28 +0000
Re: Scaling java app Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-02 10:37 -0500
Re: Scaling java app Gene Wirchenko <genew@telus.net> - 2016-12-02 09:00 -0800
Re: Scaling java app Eric Douglas <e.d.programmer@gmail.com> - 2016-12-01 13:50 -0800
Re: Scaling java app Arne Vajhøj <arne@vajhoej.dk> - 2016-11-25 10:30 -0500
Re: Scaling java app Roedy Green <inquiry@mindprod.com> - 2016-11-27 16:42 -0800
Page 2 of 5 — ← Prev page 1 [2] 3 4 5 Next page →
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-11-24 09:10 -0500 |
| Message-ID | <o16saf$95k$1@jstuckle.eternal-september.org> |
| In reply to | #35956 |
On 11/24/2016 5:01 AM, a.laforgia@gmail.com wrote: > On Wednesday, 23 November 2016 20:04:08 UTC, Jerry Stuckle wrote: > > [...] >> Yes, if you want a good UI, JavaFX is a great improvement over Swing. > > LOL :) Have you actually used it for anything serious? > Yes. Have you even tried? -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | a.laforgia@gmail.com |
|---|---|
| Date | 2016-11-25 03:48 -0800 |
| Message-ID | <c626cf29-b801-4ec2-af81-d129d75a7f79@googlegroups.com> |
| In reply to | #35959 |
On Thursday, 24 November 2016 14:10:43 UTC, Jerry Stuckle wrote: [...] > Yes. No, you haven't. >Have you even tried? Of course I have. I wouldn't be saying it's shit otherwise.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-11-25 09:58 -0500 |
| Message-ID | <o19jfg$mte$1@jstuckle.eternal-september.org> |
| In reply to | #35964 |
On 11/25/2016 6:48 AM, a.laforgia@gmail.com wrote: > On Thursday, 24 November 2016 14:10:43 UTC, Jerry Stuckle wrote: > > [...] >> Yes. > > No, you haven't. > >> Have you even tried? > > Of course I have. I wouldn't be saying it's shit otherwise. > Doesn't sound like you've tried too hard. But then some people hate ANYTHING new. I heard the same thing about Swing. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-11-25 10:22 -0500 |
| Message-ID | <o19kv3$ln1$1@gioia.aioe.org> |
| In reply to | #35964 |
On 11/25/2016 6:48 AM, a.laforgia@gmail.com wrote: > Of course I have. I wouldn't be saying it's shit otherwise. May I ask why you think that? The core concepts of JavaFX have been seen working successfully in Adobe Flex, Microsoft Silverlight and web. The foundation seems solid. Is it lacking maturity or? Arne
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-11-25 10:34 -0500 |
| Message-ID | <o19lmc$mk1$3@gioia.aioe.org> |
| In reply to | #35949 |
On 11/23/2016 3:04 PM, Jerry Stuckle wrote: > On 11/23/2016 7:58 AM, a.laforgia@gmail.com wrote: >> Are you suggesting JavaFX? Is there anyone who really uses that shit? > > Yes, if you want a good UI, JavaFX is a great improvement over Swing. > And from the way Oracle is pushing it, it looks like the future of Java. Java does not have any major market share in desktop apps and it seems very unlikely that JavaFX will change that. It has been out (since 2.x) for some years now and no indication of change. Java's future seems solid centered around Java EE, Android and big data. Arne
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-11-26 00:01 -0500 |
| Message-ID | <o1b4rv$qt5$2@jstuckle.eternal-september.org> |
| In reply to | #35969 |
On 11/25/2016 10:34 AM, Arne Vajhøj wrote: > On 11/23/2016 3:04 PM, Jerry Stuckle wrote: >> On 11/23/2016 7:58 AM, a.laforgia@gmail.com wrote: >>> Are you suggesting JavaFX? Is there anyone who really uses that shit? >> >> Yes, if you want a good UI, JavaFX is a great improvement over Swing. >> And from the way Oracle is pushing it, it looks like the future of Java. > > Java does not have any major market share in desktop apps and > it seems very unlikely that JavaFX will change that. It has been out > (since 2.x) for some years now and no indication of change. > > Java's future seems solid centered around Java EE, Android and > big data. > > Arne > > Yes, but Java is big on IOS and Android devices and Oracle is pushing Java FX for those, especially web-based apps. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-11-26 09:05 -0500 |
| Message-ID | <o1c4r7$1d6g$1@gioia.aioe.org> |
| In reply to | #35970 |
On 11/26/2016 12:01 AM, Jerry Stuckle wrote: > On 11/25/2016 10:34 AM, Arne Vajhøj wrote: >> On 11/23/2016 3:04 PM, Jerry Stuckle wrote: >>> On 11/23/2016 7:58 AM, a.laforgia@gmail.com wrote: >>>> Are you suggesting JavaFX? Is there anyone who really uses that shit? >>> >>> Yes, if you want a good UI, JavaFX is a great improvement over Swing. >>> And from the way Oracle is pushing it, it looks like the future of Java. >> >> Java does not have any major market share in desktop apps and >> it seems very unlikely that JavaFX will change that. It has been out >> (since 2.x) for some years now and no indication of change. >> >> Java's future seems solid centered around Java EE, Android and >> big data. > > Yes, but Java is big on IOS and Android devices and Oracle is pushing > Java FX for those, especially web-based apps. Oracle is not pushing JavaFX to iOS and Android. In fact they removed support for JavaFX on ARM. Those that would want to get that working will need to use various third party components. Arne
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-11-26 09:52 -0500 |
| Message-ID | <o1c7gp$uhl$1@jstuckle.eternal-september.org> |
| In reply to | #35972 |
On 11/26/2016 9:05 AM, Arne Vajhøj wrote: > On 11/26/2016 12:01 AM, Jerry Stuckle wrote: >> On 11/25/2016 10:34 AM, Arne Vajhøj wrote: >>> On 11/23/2016 3:04 PM, Jerry Stuckle wrote: >>>> On 11/23/2016 7:58 AM, a.laforgia@gmail.com wrote: >>>>> Are you suggesting JavaFX? Is there anyone who really uses that shit? >>>> >>>> Yes, if you want a good UI, JavaFX is a great improvement over Swing. >>>> And from the way Oracle is pushing it, it looks like the future of >>>> Java. >>> >>> Java does not have any major market share in desktop apps and >>> it seems very unlikely that JavaFX will change that. It has been out >>> (since 2.x) for some years now and no indication of change. >>> >>> Java's future seems solid centered around Java EE, Android and >>> big data. >> >> Yes, but Java is big on IOS and Android devices and Oracle is pushing >> Java FX for those, especially web-based apps. > > Oracle is not pushing JavaFX to iOS and Android. In fact they removed > support for JavaFX on ARM. > > Those that would want to get that working will need to use > various third party components. > > Arne > For now, yes. But it was slow and buggy. I expect them to bring it back in the future. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-11-21 19:46 -0500 |
| Message-ID | <o104ge$1rp$1@gioia.aioe.org> |
| In reply to | #35915 |
On 11/21/2016 12:06 PM, Knute Johnson wrote: > I've got a new Windows 10 laptop that has a 3200x1800 pixel display. > It's really nice but my Java application is now so small I can't see it > (not that it wasn't getting hard anyway :-). You can easily scale the entire window after the screen size. And most parts would scale with the window. It is text that is causing you problems? Arne
[toc] | [prev] | [next] | [standalone]
| From | Knute Johnson <nospam@rabbitbrush.frazmtn.com> |
|---|---|
| Date | 2016-11-21 21:12 -0600 |
| Message-ID | <o10d2l$7mf$1@dont-email.me> |
| In reply to | #35922 |
On 11/21/2016 6:46 PM, Arne Vajhøj wrote: > On 11/21/2016 12:06 PM, Knute Johnson wrote: >> I've got a new Windows 10 laptop that has a 3200x1800 pixel display. >> It's really nice but my Java application is now so small I can't see it >> (not that it wasn't getting hard anyway :-). > > You can easily scale the entire window after the screen size. > > And most parts would scale with the window. > > It is text that is causing you problems? > > Arne > > The fonts are really small but that can be fixed pretty easily. It's the frame and dialogs that are really small that can't easily be corrected. Using the windows system laf helps some but you still have to adjust the font sizes. I actually surprised there isn't some way to do it automatically with the Nimbus laf but there apparently isn't. knute
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-11-21 22:44 -0500 |
| Message-ID | <o10evf$djs$1@gioia.aioe.org> |
| In reply to | #35926 |
On 11/21/2016 10:12 PM, Knute Johnson wrote: > On 11/21/2016 6:46 PM, Arne Vajhøj wrote: >> On 11/21/2016 12:06 PM, Knute Johnson wrote: >>> I've got a new Windows 10 laptop that has a 3200x1800 pixel display. >>> It's really nice but my Java application is now so small I can't see it >>> (not that it wasn't getting hard anyway :-). >> >> You can easily scale the entire window after the screen size. >> >> And most parts would scale with the window. >> >> It is text that is causing you problems? > > The fonts are really small but that can be fixed pretty easily. It's > the frame and dialogs that are really small that can't easily be > corrected. Using the windows system laf helps some but you still have > to adjust the font sizes. I actually surprised there isn't some way to > do it automatically with the Nimbus laf but there apparently isn't. If you set the font size, use layout manager and do a pack wouldn't everything scale? I think I am missing something. Arne
[toc] | [prev] | [next] | [standalone]
| From | Knute Johnson <nospam@rabbitbrush.frazmtn.com> |
|---|---|
| Date | 2016-11-22 09:56 -0600 |
| Message-ID | <o11pr4$hdr$1@dont-email.me> |
| In reply to | #35929 |
On 11/21/2016 9:44 PM, Arne Vajhøj wrote: > On 11/21/2016 10:12 PM, Knute Johnson wrote: >> On 11/21/2016 6:46 PM, Arne Vajhøj wrote: >>> On 11/21/2016 12:06 PM, Knute Johnson wrote: >>>> I've got a new Windows 10 laptop that has a 3200x1800 pixel display. >>>> It's really nice but my Java application is now so small I can't see it >>>> (not that it wasn't getting hard anyway :-). >>> >>> You can easily scale the entire window after the screen size. >>> >>> And most parts would scale with the window. >>> >>> It is text that is causing you problems? >> >> The fonts are really small but that can be fixed pretty easily. It's >> the frame and dialogs that are really small that can't easily be >> corrected. Using the windows system laf helps some but you still have >> to adjust the font sizes. I actually surprised there isn't some way to >> do it automatically with the Nimbus laf but there apparently isn't. > > If you set the font size, use layout manager and do a pack wouldn't > everything scale? > > I think I am missing something. > > Arne > > Well it only works with the Windows LAF for starters. The simple program I'm trying to get to work has a JOptionPane dialog and the icon shows extremely small. Multiplying the font size by a factor of the new window size divided by the old window size gives a wildly too large font. So for the moment I'm going to increase the font size and later rewrite it in FX. Another wrinkle is that I can't figure out how to get a desktop link to add the required command line switches to java.exe to switch the LAF. I'm going to have to code it in. This is going to become more of a problem in the future as physically small screens (mine is an 11 inch laptop) have very high pixel counts (mine is 3200x1800). I have a large Swing app running on a Windows machine with a physically large screen with about the same pixel count and the customer is complaining about the size of the type. After what I've discovered playing with this we may have to run that program with the Windows LAF instead of the default to get it to scale better. It's disappointing that at this late stage of the game that Swing doesn't have some sort of adjustment for high DPI displays. But maybe they want us to move to FX? knute
[toc] | [prev] | [next] | [standalone]
| From | Silvio <silvio@internet.com> |
|---|---|
| Date | 2016-11-22 20:07 +0100 |
| Message-ID | <58349769$0$1849$e4fe514c@newszilla.xs4all.nl> |
| In reply to | #35931 |
On 11/22/2016 04:56 PM, Knute Johnson wrote: > This is going to become more of a problem in the future as physically > small screens (mine is an 11 inch laptop) have very high pixel counts > (mine is 3200x1800). I have a large Swing app running on a Windows > machine with a physically large screen with about the same pixel count > and the customer is complaining about the size of the type. After what > I've discovered playing with this we may have to run that program with > the Windows LAF instead of the default to get it to scale better. > > It's disappointing that at this late stage of the game that Swing > doesn't have some sort of adjustment for high DPI displays. But maybe > they want us to move to FX? > > knute > If you are worried about the future why not create a browser based user interface? That is by far the easiest way to get a responsive and scalable UI across the various screen sizes and resolutions.
[toc] | [prev] | [next] | [standalone]
| From | Knute Johnson <nospam@rabbitbrush.frazmtn.com> |
|---|---|
| Date | 2016-11-22 18:00 -0600 |
| Message-ID | <o12m57$ug$1@dont-email.me> |
| In reply to | #35932 |
On 11/22/2016 1:07 PM, Silvio wrote: > On 11/22/2016 04:56 PM, Knute Johnson wrote: >> This is going to become more of a problem in the future as physically >> small screens (mine is an 11 inch laptop) have very high pixel counts >> (mine is 3200x1800). I have a large Swing app running on a Windows >> machine with a physically large screen with about the same pixel count >> and the customer is complaining about the size of the type. After what >> I've discovered playing with this we may have to run that program with >> the Windows LAF instead of the default to get it to scale better. >> >> It's disappointing that at this late stage of the game that Swing >> doesn't have some sort of adjustment for high DPI displays. But maybe >> they want us to move to FX? >> >> knute >> > > If you are worried about the future why not create a browser based user > interface? That is by far the easiest way to get a responsive and > scalable UI across the various screen sizes and resolutions. > Like an Applet? This started with a simple program that needs to read/write a file to the local file system. I don't think you can do that with a browser based app? Really high DPI monitors are coming, something has got to give somewhere. knute
[toc] | [prev] | [next] | [standalone]
| From | Knute Johnson <nospam@rabbitbrush.frazmtn.com> |
|---|---|
| Date | 2016-11-22 19:35 -0600 |
| Message-ID | <o12roq$22m$1@dont-email.me> |
| In reply to | #35935 |
On 11/22/2016 6:59 PM, Stefan Ram wrote: > Knute Johnson <nospam@rabbitbrush.frazmtn.com> writes: >> Like an Applet? This started with a simple program that needs to >> read/write a file to the local file system. I don't think you can do >> that with a browser based app? > > There are many ways possible today that can be used to combine > Java with a browser and JavaScript. Applets used to be embedded > in a browser, but today's JavaSE embeds both a browser and > JavaScript. Let me quote a post of mine: > > (The rest of this 2016 post consists only of quoted material > from 2015.) > > Subject: How to write a text editor in Java > From: ram@zedat.fu-berlin.de (Stefan Ram) > Message-ID: <editor-20151209153607@ram.dialup.fu-berlin.de> > > There is a tool called »AsciidocFX« that will convert your > ASCIIdoc to a nice book: > > watch?v=2goMtz_vdtM > > . This is a Java application. What does Java have to do with > JavaScript? > > This Java application contains a text editor. > I am always curious to learn how to program a text editor. > So I obtained the sources for AsciidocFx. > > And this is what I learned: This is how you write a text > editor in Java in 2015: You include a WebView that is based > on WebKit. The editor then is actually Ace (ace.c9.io), i.e., > it is written in JavaScript. Actually, the Java program is > a thin container. All the actual work is done by JavaScript > (scripts). > > Statistics: > > *.java files of AsciidocFx, octets add up to: 572 Kibioctets > *.js* files of AsciidocFx, octets add up to: 11.45 Mebioctets > > JavaScript - the future of Java! > > First, write your application in JavaScript. > > Then, if you want a single cross-platform »executable file«, > add a thin container in Java. > I think for now anyway it is going to be much less work to learn JavaFX. knute
[toc] | [prev] | [next] | [standalone]
| From | Silvio <silvio@internet.com> |
|---|---|
| Date | 2016-11-24 00:51 +0100 |
| Message-ID | <58362b93$0$2038$e4fe514c@newszilla.xs4all.nl> |
| In reply to | #35935 |
On 11/23/2016 01:00 AM, Knute Johnson wrote: > On 11/22/2016 1:07 PM, Silvio wrote: >> If you are worried about the future why not create a browser based user >> interface? That is by far the easiest way to get a responsive and >> scalable UI across the various screen sizes and resolutions. >> > > Like an Applet? This started with a simple program that needs to > read/write a file to the local file system. I don't think you can do > that with a browser based app? > > Really high DPI monitors are coming, something has got to give somewhere. > > knute > No, not an Applet. I used invisible applets in stead of JS in my early AJAX-avant-la-lettre days before JS had XHR. But for the rest I never liked the Applet concept. Reading/writing local files would indeed be a challenge. But if it is a simple file-in/file-out thingy than I usually opt for a web-app with an upload/download mechanism. Really basic stuff. I can hardly remember the days when I used to worry about distributing an application, let alone a users OS, Java version, etc. You would be really hard pressed to get me to go there ever again. JavaFX is a dead end.
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-11-23 10:26 -0500 |
| Message-ID | <o14ceq$en3$1@gioia.aioe.org> |
| In reply to | #35931 |
On 11/22/2016 10:56 AM, Knute Johnson wrote:
> Another wrinkle is that I can't figure out how to get
> a desktop link to add the required command line switches to java.exe to
> switch the LAF. I'm going to have to code it in.
javaw -Dlaf=whatever ...
and:
UIManager.setLookAndFeel(System.getProperty("laf"));
?
Arne
[toc] | [prev] | [next] | [standalone]
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Date | 2016-11-23 15:54 -0500 |
| Message-ID | <o14vk7$ke4$1@dont-email.me> |
| In reply to | #35942 |
On 11/23/2016 10:26 AM, Arne Vajhøj wrote:
> On 11/22/2016 10:56 AM, Knute Johnson wrote:
>> Another wrinkle is that I can't figure out how to get
>> a desktop link to add the required command line switches to java.exe to
>> switch the LAF. I'm going to have to code it in.
>
> javaw -Dlaf=whatever ...
>
> and:
>
> UIManager.setLookAndFeel(System.getProperty("laf"));
Haven't tried it myself, but this should be possible without code
changes. From the Tutorial:
If the program hasn't successfully specified a L&F, then the UI
manager uses the L&F specified by the swing.defaultlaf
property. [...]
... so -Dswing.defaultlaf=whatever should suffice ...
[...] If the property is specified in both the swing.properties
file and on the command line, the command-line definition takes
precedence.
... so editing swing.properties would be an alternative (but would
affect the L&F of *all* applications that don't set their own).
--
esosman@comcast-dot-net.invalid
"Nobody ever went broke underestimating the intelligence of the
American public." -- HLM (paraphrased)
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-11-23 20:46 -0500 |
| Message-ID | <o15gq5$b73$1@gioia.aioe.org> |
| In reply to | #35950 |
On 11/23/2016 3:54 PM, Eric Sosman wrote:
> On 11/23/2016 10:26 AM, Arne Vajhøj wrote:
>> On 11/22/2016 10:56 AM, Knute Johnson wrote:
>>> Another wrinkle is that I can't figure out how to get
>>> a desktop link to add the required command line switches to java.exe to
>>> switch the LAF. I'm going to have to code it in.
>>
>> javaw -Dlaf=whatever ...
>>
>> and:
>>
>> UIManager.setLookAndFeel(System.getProperty("laf"));
>
> Haven't tried it myself, but this should be possible without code
> changes. From the Tutorial:
>
> If the program hasn't successfully specified a L&F, then the UI
> manager uses the L&F specified by the swing.defaultlaf
> property. [...]
>
> ... so -Dswing.defaultlaf=whatever should suffice ...
>
> [...] If the property is specified in both the swing.properties
> file and on the command line, the command-line definition takes
> precedence.
Nice. I did not know about that one.
Arne
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-11-23 12:00 -0500 |
| Message-ID | <o14hv9$ovg$1@gioia.aioe.org> |
| In reply to | #35931 |
On 11/22/2016 10:56 AM, Knute Johnson wrote:
> Well it only works with the Windows LAF for starters. The simple
> program I'm trying to get to work has a JOptionPane dialog and the icon
> shows extremely small. Multiplying the font size by a factor of the new
> window size divided by the old window size gives a wildly too large
> font.
How do you set the font size?
The following works for me:
import java.awt.BorderLayout;
import java.awt.Toolkit;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.plaf.FontUIResource;
public class FontSizing extends JFrame {
private static final long serialVersionUID = 1L;
private void setFontSizePoints(int siz) {
UIDefaults def = UIManager.getLookAndFeelDefaults();
Object[] keys = def.keySet().toArray();
for(Object key : keys) {
if(def.get(key) instanceof FontUIResource) {
FontUIResource fnt = (FontUIResource)def.get(key);
def.put(key, new FontUIResource(fnt.getFontName(), fnt.getStyle(),
siz));
}
}
}
private void setFontSizeInches(double siz) {
int dpi = Toolkit.getDefaultToolkit().getScreenResolution();
int pt = (int)(siz * dpi);
setFontSizePoints(pt);
}
public FontSizing() {
setFontSizeInches(0.75);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(new BorderLayout());
setTitle("Font Sizing");
JButton test = new JButton("Test");
test.addActionListener((ev) ->
JOptionPane.showMessageDialog(FontSizing.this, "It works"));
getContentPane().add(test, BorderLayout.CENTER);
pack();
}
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> (new
FontSizing()).setVisible(true));
}
}
> It's disappointing that at this late stage of the game that Swing
> doesn't have some sort of adjustment for high DPI displays. But maybe
> they want us to move to FX?
I don't think desktop is a priority at all.
Arne
[toc] | [prev] | [next] | [standalone]
Page 2 of 5 — ← Prev page 1 [2] 3 4 5 Next page →
Back to top | Article view | comp.lang.java.programmer
csiph-web