Skip to main content

Screen size, layouts on multiple devices?

4 replies [Last post]
titanandrews
Offline
Joined: 2004-03-04

Hi All,

Sun promises to target multiple devices with JavaFX. So I can write an app, and deploy it to my desktop, as an embedded applet on a web site, on a mobile phone, or whatever.

How are things like screen size and layout managers going to be handled across all devices? For example, if I build an app that looks good on the desktop at say 800 X 600, it's obviously not going to look the same on my mobile phone. It's one thing to run on multiple platforms/devices, but to look good is completely another.
Is JavaFX going to address any of these kinds of issues, or is this completely out of scope? How do I make my app look good everywhere without writing multiple interfaces?

thanks,

B

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
michael_heinrichs
Offline
Joined: 2007-11-15

What would you expect from JavaFX to help with these issues?

titanandrews
Offline
Joined: 2004-03-04

Well, it's a common problem among different platforms. It's even more of a problem among different devices because of screen size. All the information I've read so far on JavaFX makes it sound like you can write your application once and deploy it to "all the screens of your life" It sounds good in theory, but I doubt this is going to be true. I think they're talking about only running the app, not how it looks.

michael_heinrichs
Offline
Joined: 2007-11-15

Yes, you are right. I would expect that the UI has to be designed for each screen separately. Although I think the major issue is not how it looks, but the usability.

The screen size is one issue. It's not so much about resizing and "looking good", but about the amount of information you can show at once. Take a look at this forum for instance. You have links at the top-left, top-right, and at the bottom. It shows a lot of entries on one screen and you can easily scroll down and search for the ones you are interested in. Users would go nuts, if they have to navigate on a page like this on a phone. You would have to redesign it, so users can find the information they want easily and fast, showing only a small amount of information at once.

Another issue, maybe even more important, is the type of input. On a computer you are using the mouse most of time, while most of today's phones are still controlled by keyboard only. Designing a UI which is fun to navigate with keyboard only is very different from a UI which is designed to be used mainly with some kind of pointing device.

The promise of JavaFX Script is to run on each screen. It does not mean, that you can take any desktop-application and run it on phone without some manual modification. The benefit is, that you can reuse large parts of your code and the very same developer can write applications for the desktop, the phone and everything else, because the language and large parts of the API are the same.

But JavaFX is still in development and if you have some good ideas, how to simplify the migration process between different screens, I would be very interested to hear them. :-)

titanandrews
Offline
Joined: 2004-03-04

"...because the language and large parts of the API are the same."

You have the same story with Java and J2ME. The language is the same and some parts of the standard libraries are the same, but none of the GUI libraries are the same. You write Swing code for the desktop and J2ME for mobile. I'm not sure how another language and set of APIs is going to help.

I guess what I'm asking is, is a Frame going to be Frame on the desktop as well as a mobile app? Or when JavaFX mobile comes out next year, am I going to have to write a completely different app and use MEFrame or something? Is the GUI API abstracted enough so that it can really be useful across devices?

And what about user input?
Just thinking out loud...
What if user input can be abstracted enough so that I could have a button whose action is run by a click of the mouse on the desktop and a number 1 key press on the phone - configurable of course.

My point is, it's true you are likely to have multiple GUIs just because of the usability factor. But there will be apps that could be just as usable on the mobile device as on the desktop without changing a thing. A good example is a stock report app.