Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35915 > unrolled thread

Scaling java app

Started byKnute Johnson <nospam@rabbitbrush.frazmtn.com>
First post2016-11-21 11:06 -0600
Last post2016-11-27 16:42 -0800
Articles 20 on this page of 92 — 13 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  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 1 of 5  [1] 2 3 4 5  Next page →


#35915 — Scaling java app

FromKnute Johnson <nospam@rabbitbrush.frazmtn.com>
Date2016-11-21 11:06 -0600
SubjectScaling java app
Message-ID<o0v9ih$j1e$1@dont-email.me>
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 :-).

Is there a generic way to scale a Java app when it runs under Windows?

Thanks,

knute...

[toc] | [next] | [standalone]


#35916

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2016-11-21 19:48 +0000
Message-ID<o0vj3b$s5n$1@dont-email.me>
In reply to#35915
On Mon, 21 Nov 2016 11:06:59 -0600, 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 :-).
> 
> Is there a generic way to scale a Java app when it runs under Windows?
>
I express the required width and height of all GUI components as a 
percentage of the screen size, which is retrieved by using ToolKit, and 
calculate the required size (screenSize.width * required width,
screenSize.height, requiredheight) when the component is created. This 
way the the main window, for instance, will always be, say, 90% of the 
screen height and 95% of its width and the components will always occupy 
the same amount of the main window. The same trick also works for scaling 
fonts.

It gets actual workouts too, since the same apps run on my development 
box, which uses a 1024x768 screen and on this laptop with a 1280x800 
screen. Here's code showing how I get the screen dimensions:

import java.awt.*;
import javax.swing.*;

public class GetScreenSize extends JFrame implements Runnable 
{
   Toolkit        toolkit = null;
   Dimension      d = null;

   public static void main(String args[]) 
   {
      GetScreenSize gss = new GetScreenSize();
      EventQueue.invokeLater(gss);
   }

   public void run() 
   {
      toolkit = getToolkit();
      d = toolkit.getScreenSize();
      System.out.println("Screen width = " + d.getWidth());
      System.out.println("Screen height = " + d.getHeight());
   }
}


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [prev] | [next] | [standalone]


#35917

FromEric Douglas <e.d.programmer@gmail.com>
Date2016-11-21 12:33 -0800
Message-ID<3b705f92-d63a-4062-a7e3-72bf4ac279bc@googlegroups.com>
In reply to#35916
On Monday, November 21, 2016 at 2:49:45 PM UTC-5, Martin Gregorie wrote:
> I express the required width and height of all GUI components as a 
> percentage of the screen size, which is retrieved by using ToolKit, and 
> calculate the required size (screenSize.width * required width,
> screenSize.height, requiredheight) when the component is created. This 
> way the the main window, for instance, will always be, say, 90% of the 
> screen height and 95% of its width and the components will always occupy 
> the same amount of the main window. The same trick also works for scaling 
> fonts.
> 
> It gets actual workouts too, since the same apps run on my development 
> box, which uses a 1024x768 screen and on this laptop with a 1280x800 
> screen. Here's code showing how I get the screen dimensions:
> 
> import java.awt.*;
> import javax.swing.*;
> 
> public class GetScreenSize extends JFrame implements Runnable 
> {
>    Toolkit        toolkit = null;
>    Dimension      d = null;
> 
>    public static void main(String args[]) 
>    {
>       GetScreenSize gss = new GetScreenSize();
>       EventQueue.invokeLater(gss);
>    }
> 
>    public void run() 
>    {
>       toolkit = getToolkit();
>       d = toolkit.getScreenSize();
>       System.out.println("Screen width = " + d.getWidth());
>       System.out.println("Screen height = " + d.getHeight());
>    }
> }

I just set my windows to hard coded sizes, currently no bigger than 1024x600, the minimum resolution to run the app.  You could scale them but then you should provide an option for that.  What if I have a smaller screen with a higher resolution, what if I still want the higher resolution to make the app windows smaller, or what if I want them fit to the screen?  What if I use a 55" screen, then maybe I want them fit to the screen for presentation, or maybe I want to show 4 windows at once.

For my app we find it easier to use non-re-sizable windows, but the simplest option for the end user may be to make the window re-sizable.  Every component can be linked to the window to resize itself if the user resizes the window.  Then either the LayoutManager adjusts their location, or they also have to move themselves if the component above them changes it's size and/or location.  I have a demo program with a JTable that populates with different column widths and adjusts it's total size, and a JLabel displaying the total rows populated linked to the bottom right corner of the table with a ComponentListener (null layout).

[toc] | [prev] | [next] | [standalone]


#35920

FromKnute Johnson <nospam@rabbitbrush.frazmtn.com>
Date2016-11-21 18:23 -0600
Message-ID<o1035n$n3d$1@dont-email.me>
In reply to#35917
The Windows look and feel will do some scaling of the frame and other 
bits.  To get this to just work it looks like I'm going to have to 
change it from a Swing app to a JavaFX app where that sort of scaling is 
automatic.

Thanks for all the suggestions everybody (Stefan too).  The temporary 
workaround is to use the windows look and feel and scale the font based 
on screen size.

knute...

On 11/21/2016 2:33 PM, Eric Douglas wrote:
> On Monday, November 21, 2016 at 2:49:45 PM UTC-5, Martin Gregorie wrote:
>> I express the required width and height of all GUI components as a
>> percentage of the screen size, which is retrieved by using ToolKit, and
>> calculate the required size (screenSize.width * required width,
>> screenSize.height, requiredheight) when the component is created. This
>> way the the main window, for instance, will always be, say, 90% of the
>> screen height and 95% of its width and the components will always occupy
>> the same amount of the main window. The same trick also works for scaling
>> fonts.
>>
>> It gets actual workouts too, since the same apps run on my development
>> box, which uses a 1024x768 screen and on this laptop with a 1280x800
>> screen. Here's code showing how I get the screen dimensions:
>>
>> import java.awt.*;
>> import javax.swing.*;
>>
>> public class GetScreenSize extends JFrame implements Runnable
>> {
>>    Toolkit        toolkit = null;
>>    Dimension      d = null;
>>
>>    public static void main(String args[])
>>    {
>>       GetScreenSize gss = new GetScreenSize();
>>       EventQueue.invokeLater(gss);
>>    }
>>
>>    public void run()
>>    {
>>       toolkit = getToolkit();
>>       d = toolkit.getScreenSize();
>>       System.out.println("Screen width = " + d.getWidth());
>>       System.out.println("Screen height = " + d.getHeight());
>>    }
>> }
>
> I just set my windows to hard coded sizes, currently no bigger than 1024x600, the minimum resolution to run the app.  You could scale them but then you should provide an option for that.  What if I have a smaller screen with a higher resolution, what if I still want the higher resolution to make the app windows smaller, or what if I want them fit to the screen?  What if I use a 55" screen, then maybe I want them fit to the screen for presentation, or maybe I want to show 4 windows at once.
>
> For my app we find it easier to use non-re-sizable windows, but the simplest option for the end user may be to make the window re-sizable.  Every component can be linked to the window to resize itself if the user resizes the window.  Then either the LayoutManager adjusts their location, or they also have to move themselves if the component above them changes it's size and/or location.  I have a demo program with a JTable that populates with different column widths and adjusts it's total size, and a JLabel displaying the total rows populated linked to the bottom right corner of the table with a ComponentListener (null layout).
>

[toc] | [prev] | [next] | [standalone]


#35924

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-11-21 21:22 -0500
Message-ID<o10a40$60a$3@jstuckle.eternal-september.org>
In reply to#35920
On 11/21/2016 7:23 PM, Knute Johnson wrote:
> The Windows look and feel will do some scaling of the frame and other
> bits.  To get this to just work it looks like I'm going to have to
> change it from a Swing app to a JavaFX app where that sort of scaling is
> automatic.
> 
> Thanks for all the suggestions everybody (Stefan too).  The temporary
> workaround is to use the windows look and feel and scale the font based
> on screen size.
> 
> knute...
> 

Bad idea.  You don't know the screen size - all you know is the number
of pixels in the window.  It might be a 5" phone or a full-screen 27"
window.

Use percentages with CSS, if you must.  Let the user pick the font size.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#35925

FromArne Vajhøj <arne@vajhoej.dk>
Date2016-11-21 21:25 -0500
Message-ID<o10abh$8lo$1@gioia.aioe.org>
In reply to#35924
On 11/21/2016 9:22 PM, Jerry Stuckle wrote:
> On 11/21/2016 7:23 PM, Knute Johnson wrote:
>> The Windows look and feel will do some scaling of the frame and other
>> bits.  To get this to just work it looks like I'm going to have to
>> change it from a Swing app to a JavaFX app where that sort of scaling is
>> automatic.
>>
>> Thanks for all the suggestions everybody (Stefan too).  The temporary
>> workaround is to use the windows look and feel and scale the font based
>> on screen size.
>
> Bad idea.  You don't know the screen size - all you know is the number
> of pixels in the window.  It might be a 5" phone or a full-screen 27"
> window.

Phones usually do not support Swing.

> Use percentages with CSS, if you must.  Let the user pick the font size.

Swing does not support CSS. JavaFX does.

Arne

[toc] | [prev] | [next] | [standalone]


#35927

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-11-21 22:29 -0500
Message-ID<o10e1e$aol$1@jstuckle.eternal-september.org>
In reply to#35925
On 11/21/2016 9:25 PM, Arne Vajhøj wrote:
> On 11/21/2016 9:22 PM, Jerry Stuckle wrote:
>> On 11/21/2016 7:23 PM, Knute Johnson wrote:
>>> The Windows look and feel will do some scaling of the frame and other
>>> bits.  To get this to just work it looks like I'm going to have to
>>> change it from a Swing app to a JavaFX app where that sort of scaling is
>>> automatic.
>>>
>>> Thanks for all the suggestions everybody (Stefan too).  The temporary
>>> workaround is to use the windows look and feel and scale the font based
>>> on screen size.
>>
>> Bad idea.  You don't know the screen size - all you know is the number
>> of pixels in the window.  It might be a 5" phone or a full-screen 27"
>> window.
> 
> Phones usually do not support Swing.
> 
>> Use percentages with CSS, if you must.  Let the user pick the font size.
> 
> Swing does not support CSS. JavaFX does.
> 
> Arne
> 

I was going by the suggestion to change it from Swing to JavaFX - so it
would be supported by phones.

My comments stand.  And some people need to make fools of themselves anyway.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#35928

FromArne Vajhøj <arne@vajhoej.dk>
Date2016-11-21 22:41 -0500
Message-ID<o10eov$d7i$1@gioia.aioe.org>
In reply to#35927
On 11/21/2016 10:29 PM, Jerry Stuckle wrote:
> On 11/21/2016 9:25 PM, Arne Vajhøj wrote:
>> On 11/21/2016 9:22 PM, Jerry Stuckle wrote:
>>> On 11/21/2016 7:23 PM, Knute Johnson wrote:
>>>> The Windows look and feel will do some scaling of the frame and other
>>>> bits.  To get this to just work it looks like I'm going to have to
>>>> change it from a Swing app to a JavaFX app where that sort of scaling is
>>>> automatic.
>>>>
>>>> Thanks for all the suggestions everybody (Stefan too).  The temporary
>>>> workaround is to use the windows look and feel and scale the font based
>>>> on screen size.
>>>
>>> Bad idea.  You don't know the screen size - all you know is the number
>>> of pixels in the window.  It might be a 5" phone or a full-screen 27"
>>> window.
>>
>> Phones usually do not support Swing.
>>
>>> Use percentages with CSS, if you must.  Let the user pick the font size.
>>
>> Swing does not support CSS. JavaFX does.
>
> I was going by the suggestion to change it from Swing to JavaFX - so it
> would be supported by phones.
 >
> My comments stand.

So:

 >>>> Thanks for all the suggestions everybody (Stefan too).  The temporary
 >>>> workaround is to use the windows look and feel and scale the font 
based
 >>>> on screen size.

 >>> Bad idea.  You don't know the screen size - all you know is the number
 >>> of pixels in the window.  It might be a 5" phone or a full-screen 27"
 >>> window.

stands?

:-)

Arne

[toc] | [prev] | [next] | [standalone]


#35930

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-11-22 10:51 -0500
Message-ID<o11pga$faf$2@jstuckle.eternal-september.org>
In reply to#35928
On 11/21/2016 10:41 PM, Arne Vajhøj wrote:
> On 11/21/2016 10:29 PM, Jerry Stuckle wrote:
>> On 11/21/2016 9:25 PM, Arne Vajhøj wrote:
>>> On 11/21/2016 9:22 PM, Jerry Stuckle wrote:
>>>> On 11/21/2016 7:23 PM, Knute Johnson wrote:
>>>>> The Windows look and feel will do some scaling of the frame and other
>>>>> bits.  To get this to just work it looks like I'm going to have to
>>>>> change it from a Swing app to a JavaFX app where that sort of
>>>>> scaling is
>>>>> automatic.
>>>>>
>>>>> Thanks for all the suggestions everybody (Stefan too).  The temporary
>>>>> workaround is to use the windows look and feel and scale the font
>>>>> based
>>>>> on screen size.
>>>>
>>>> Bad idea.  You don't know the screen size - all you know is the number
>>>> of pixels in the window.  It might be a 5" phone or a full-screen 27"
>>>> window.
>>>
>>> Phones usually do not support Swing.
>>>
>>>> Use percentages with CSS, if you must.  Let the user pick the font
>>>> size.
>>>
>>> Swing does not support CSS. JavaFX does.
>>
>> I was going by the suggestion to change it from Swing to JavaFX - so it
>> would be supported by phones.
>>
>> My comments stand.
> 
> So:
> 
>>>>> Thanks for all the suggestions everybody (Stefan too).  The temporary
>>>>> workaround is to use the windows look and feel and scale the font
> based
>>>>> on screen size.
> 
>>>> Bad idea.  You don't know the screen size - all you know is the number
>>>> of pixels in the window.  It might be a 5" phone or a full-screen 27"
>>>> window.
> 
> stands?
> 
> :-)
> 
> Arne
> 
> 

The first quote was not my comment.  But you seem too stoopid to
understand it.

The second comment - which you conveniently trimmed the important parts
- does stand.

So you can stop trolling any time.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#35938

Froma.laforgia@gmail.com
Date2016-11-23 04:58 -0800
Message-ID<575a6d23-9927-4530-8fa6-f91c2da1b509@googlegroups.com>
In reply to#35924
On Tuesday, 22 November 2016 02:22:37 UTC, Jerry Stuckle  wrote:

[...
> Bad idea.  You don't know the screen size - all you know is the number
> of pixels in the window.  It might be a 5" phone or a full-screen 27"
> window.

The vast majority of applications is not written with a responsive design in mind - which is perfectly reasonable. 

> Use percentages with CSS, if you must.

Are you suggesting JavaFX? Is there anyone who really uses that shit?

[toc] | [prev] | [next] | [standalone]


#35939

FromEric Douglas <e.d.programmer@gmail.com>
Date2016-11-23 05:18 -0800
Message-ID<78c4e825-9eb9-433e-93f9-beaa7bf85546@googlegroups.com>
In reply to#35938
On Wednesday, November 23, 2016 at 7:58:59 AM UTC-5, a.laf...@gmail.com wrote:
> Are you suggesting JavaFX? Is there anyone who really uses that shit?

I use a custom language (http://www.basis.com/bbj), which integrates with Swing, so using JavaFX would add an extra layer of overhead so I'm not going there without a good reason.  So far all I know is JavaFX is required to write a web browser, as Swing can only display simple html, and it's tedious to write an app that is both Swing and JavaFX.

[toc] | [prev] | [next] | [standalone]


#35941

FromArne Vajhøj <arne@vajhoej.dk>
Date2016-11-23 09:52 -0500
Message-ID<o14afh$b3c$1@gioia.aioe.org>
In reply to#35939
On 11/23/2016 8:18 AM, Eric Douglas wrote:
> On Wednesday, November 23, 2016 at 7:58:59 AM UTC-5,
> a.laf...@gmail.com wrote:
>> Are you suggesting JavaFX? Is there anyone who really uses that
>> shit?
>
> I use a custom language (http://www.basis.com/bbj), which integrates
> with Swing, so using JavaFX would add an extra layer of overhead so
> I'm not going there without a good reason.  So far all I know is
> JavaFX is required to write a web browser, as Swing can only display
> simple html, and it's tedious to write an app that is both Swing and
> JavaFX.

KISS is good.

And mixing can be messy even though I think they have improved (*).

Arne

*) Does anyone know if they got rid of the two event threads?

[toc] | [prev] | [next] | [standalone]


#35943

FromEric Douglas <e.d.programmer@gmail.com>
Date2016-11-23 07:51 -0800
Message-ID<5a70e722-fdaf-437a-b0c8-2b7b67fd6f91@googlegroups.com>
In reply to#35941
On Wednesday, November 23, 2016 at 9:52:42 AM UTC-5, Arne Vajhøj wrote:
> On 11/23/2016 8:18 AM, Eric Douglas wrote:
> > On Wednesday, November 23, 2016 at 7:58:59 AM UTC-5,
> > a.laf...@gmail.com wrote:
> >> Are you suggesting JavaFX? Is there anyone who really uses that
> >> shit?
> >
> > I use a custom language (http://www.basis.com/bbj), which integrates
> > with Swing, so using JavaFX would add an extra layer of overhead so
> > I'm not going there without a good reason.  So far all I know is
> > JavaFX is required to write a web browser, as Swing can only display
> > simple html, and it's tedious to write an app that is both Swing and
> > JavaFX.
> 
> KISS is good.
> 
> And mixing can be messy even though I think they have improved (*).
> 
> Arne
> 
> *) Does anyone know if they got rid of the two event threads?

The thread thing is the nuisance.
To construct a new javafx.embed.swing.JFXPanel in a Swing environment you have to execute a Platform.runLater(new Runnable() {
To load or reload a javafx.scene.web.WebEngine in that Swing environment you have to execute a Platform.runLater(new Runnable() {

[toc] | [prev] | [next] | [standalone]


#35940

FromArne Vajhøj <arne@vajhoej.dk>
Date2016-11-23 09:46 -0500
Message-ID<o14a3p$ah0$1@gioia.aioe.org>
In reply to#35938
On 11/23/2016 7:58 AM, a.laforgia@gmail.com wrote:
> On Tuesday, 22 November 2016 02:22:37 UTC, Jerry Stuckle  wrote:
> [...
>> Bad idea.  You don't know the screen size - all you know is the
>> number of pixels in the window.  It might be a 5" phone or a
>> full-screen 27" window.
>
> The vast majority of applications is not written with a responsive
> design in mind - which is perfectly reasonable.

Swing app - perfectly reasonable.

Web app - no no no.

>> Use percentages with CSS, if you must.
>
> Are you suggesting JavaFX? Is there anyone who really uses that
> shit?

Desktop apps - yes.

Mobile - third party tools do exist but I don't think they are used
much. Vendor provided solution (Android Java, iOS objective-C/Swift),
JavaScript based frameworks like PhoneGap/Cordova and other
popular stuff like Xamarin (C#).

Arne

[toc] | [prev] | [next] | [standalone]


#35944

FromEric Douglas <e.d.programmer@gmail.com>
Date2016-11-23 08:07 -0800
Message-ID<e6be7e81-066e-4012-b487-11cd89cb4cd2@googlegroups.com>
In reply to#35940
On Wednesday, November 23, 2016 at 9:46:31 AM UTC-5, Arne Vajhøj wrote:
> Desktop apps - yes.
> 
> Mobile - third party tools do exist but I don't think they are used
> much. Vendor provided solution (Android Java, iOS objective-C/Swift),
> JavaScript based frameworks like PhoneGap/Cordova and other
> popular stuff like Xamarin (C#).

What about this?
http://www.oracle.com/technetwork/developer-tools/maf/overview/index.html

[toc] | [prev] | [next] | [standalone]


#35946

FromArne Vajhøj <arne@vajhoej.dk>
Date2016-11-23 12:10 -0500
Message-ID<o14ihh$qg1$1@gioia.aioe.org>
In reply to#35944
On 11/23/2016 11:07 AM, Eric Douglas wrote:
> On Wednesday, November 23, 2016 at 9:46:31 AM UTC-5, Arne Vajhøj wrote:
>> Desktop apps - yes.
>>
>> Mobile - third party tools do exist but I don't think they are used
>> much. Vendor provided solution (Android Java, iOS objective-C/Swift),
>> JavaScript based frameworks like PhoneGap/Cordova and other
>> popular stuff like Xamarin (C#).
>
> What about this?
> http://www.oracle.com/technetwork/developer-tools/maf/overview/index.html

Never heard about it before.

Sounds like a mix of PhoneGap approach with Xamarin approach (with Java
instead of C#).

Definitely not JavaFX.

Arne

[toc] | [prev] | [next] | [standalone]


#35947

FromEric Douglas <e.d.programmer@gmail.com>
Date2016-11-23 10:39 -0800
Message-ID<8e62683d-a36e-4ea0-a981-c5a1401043e4@googlegroups.com>
In reply to#35946
On Wednesday, November 23, 2016 at 12:10:22 PM UTC-5, Arne Vajhøj wrote:
> On 11/23/2016 11:07 AM, Eric Douglas wrote:
> > On Wednesday, November 23, 2016 at 9:46:31 AM UTC-5, Arne Vajhøj wrote:
> >> Desktop apps - yes.
> >>
> >> Mobile - third party tools do exist but I don't think they are used
> >> much. Vendor provided solution (Android Java, iOS objective-C/Swift),
> >> JavaScript based frameworks like PhoneGap/Cordova and other
> >> popular stuff like Xamarin (C#).
> >
> > What about this?
> > http://www.oracle.com/technetwork/developer-tools/maf/overview/index.html
> 
> Never heard about it before.
> 
> Sounds like a mix of PhoneGap approach with Xamarin approach (with Java
> instead of C#).
> 
> Definitely not JavaFX.
> 
> Arne

Yeah, wasn't suggesting it was anything to do with JavaFX, wondering if it's a new catch-all for Java developers who need programs to work on mobile.

[toc] | [prev] | [next] | [standalone]


#35948

FromArne Vajhøj <arne@vajhoej.dk>
Date2016-11-23 14:57 -0500
Message-ID<o14sbm$1cko$1@gioia.aioe.org>
In reply to#35947
On 11/23/2016 1:39 PM, Eric Douglas wrote:
> On Wednesday, November 23, 2016 at 12:10:22 PM UTC-5, Arne Vajhøj wrote:
>> On 11/23/2016 11:07 AM, Eric Douglas wrote:
>>> What about this?
>>> http://www.oracle.com/technetwork/developer-tools/maf/overview/index.html
>>
>> Never heard about it before.
>>
>> Sounds like a mix of PhoneGap approach with Xamarin approach (with Java
>> instead of C#).
>>
>> Definitely not JavaFX.
>
> Yeah, wasn't suggesting it was anything to do with JavaFX, wondering if
 > it's a new catch-all for Java developers who need programs to work
 > on mobile.

That is probably Oracle's plan.

Not sure they will be successful though. This is a very
crowded market.

Arne

[toc] | [prev] | [next] | [standalone]


#35949

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-11-23 15:04 -0500
Message-ID<o14sl5$7cb$2@jstuckle.eternal-september.org>
In reply to#35938
On 11/23/2016 7:58 AM, a.laforgia@gmail.com wrote:
> On Tuesday, 22 November 2016 02:22:37 UTC, Jerry Stuckle  wrote:
> 
> [...
>> Bad idea.  You don't know the screen size - all you know is the number
>> of pixels in the window.  It might be a 5" phone or a full-screen 27"
>> window.
> 
> The vast majority of applications is not written with a responsive design in mind - which is perfectly reasonable. 
> 
>> Use percentages with CSS, if you must.
> 
> 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.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#35956

Froma.laforgia@gmail.com
Date2016-11-24 02:01 -0800
Message-ID<37dd5a2c-2b63-48bc-bf56-af16c6dff2bf@googlegroups.com>
In reply to#35949
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? 

[toc] | [prev] | [next] | [standalone]


Page 1 of 5  [1] 2 3 4 5  Next page →

Back to top | Article view | comp.lang.java.programmer


csiph-web