wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Should I be using swing for this? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Should I be using swing for this?" Watch "Should I be using swing for this?" New topic
Author

Should I be using swing for this?

Jack O'Connor
Greenhorn

Joined: Feb 17, 2013
Posts: 4
Ok, so I plan on making a program using java. This program requires a really slick, modern UI. An example of something similarly slick would be spotify.

I have had a brief look through some of the best known LAF's and from what I have seen nothing so far fits the bill (However, feel free to recommend anything you feel appropriate).

I also know that making your own LAF is very tough so I'm not really interested in doing that.

So bearing all this in mind, is there any solution to my problem?

-A really slick LAF I may have missed?

-Some other language I could use entirely for UI and layout? (The only reason that I wonder this is because android uses XML)

Thanks in advance for any help!
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10268
    
    8

Welcome to the Ranch.

Swing is designed for stand alone applications (also via JWS). Do you expect your users to use such a stand alone application which would run on their machines or would they use a web interface (via a browser?) You mention Android. Does that indicate an android app?

Google around for ready made LAF. The closest I could find (very quickly) with images I saw of spotify is the Synthetic Black Eye L&F.
http://www.javasoft.de/synthetica/themes/


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Jack O'Connor
Greenhorn

Joined: Feb 17, 2013
Posts: 4
Thanks very much.

I probably should have been clearer with my question.

I know that this sounds strange but I haven't yet decided whether it will be a stand alone application or a website but it wont be an android app. In the case of the latter though, it will be a website that they will be interacting with, not so much an applet on a website, so java doesn't really come into the equation, though I've heard that facebook is programmed in Python?

Also concerning LAF thanks for taking the time to look up some options for me but I don't think that I was very clear in my description. What i want is something that is as modern and slick as Spotify for example, but not necessarily the same. You see, (this is what I left out) what I want is to allow users to customise the colour of their UI, both text and background colour of the "panels". This is the vital part. But please, don't go out of your way to look for a suitable LAF for me. I will start a through search now for something suitable.

About the android stuff. It wont be an app. The only reason I mentioned it is because android uses XML for its layout. I was wondering is something similar possible with swing? Or perhaps with web design if I go down that route.

So my questions are a little bit broader now:

1) Just from the layout, UI side of things, which would be easier web or stand alone swing?

2)If I decide to go web can I apply java to it much or is it any good for that at all?

3)Do you think there is any LAF out there which is suitable? In fairness, this is very unique (which is the point).

4)Can I use some other language on top of java for layout and UI? (similar to XML for android)

Thanks again!
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Jack O'Connor wrote:1) Just from the layout, UI side of things, which would be easier web or stand alone swing?

2)If I decide to go web can I apply java to it much or is it any good for that at all?


You're asking the key question here ("Should I write a Java application or a web application?") but I think you're asking it in the wrong way. You don't make that choice based on how easy it is (whatever that means -- how easy for who? You? the user?), you make that choice based on how the application is going to be used and how you plan to distribute it.

It seems that you know very little about web applications, so if you decide to produce a web application you're going to have to go through all of the hoops of finding (and paying for) a place to host the application. There's a lot of things to learn there.

On the other hand it seems that you don't know much more about Java applications (you didn't seem to know that a LAF was something which you apply to a Swing application, for example). So there's a lot of things to learn there too. And you didn't even mention Java FX as a possibility, and I think you should consider that.

So for now I would recommend that you get some experience in the fields you're looking at. Start by writing a Swing application (if you haven't done that already) and experiment with the existing LAFs.
Jack O'Connor
Greenhorn

Joined: Feb 17, 2013
Posts: 4
@Paul Clapham

Ok, first off, you're correct in your first point.

And yes I know very little about web applications - small bits of html is the height of it. But I'm not stupid, of course I know you have to pay for a place to host the site.

I don't know what gave you the impression that I didn't know that an LAF was something which is applied a swing application. And of course I've made a swing application before. Why on earth would be asking a question like this if i hadn't???

I have heard of javafx before but hadn't looked at it at all, I had just seen it mentioned at the top of one of the swing tutorials on the the java tutorial (the official oracle one);

I'm just trying to get some information on something i will probably begin in a few months. I was getting ahead of myself, just forget it....
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Jack O'Connor wrote:I don't know what gave you the impression that I didn't know that an LAF was something which is applied a swing application. And of course I've made a swing application before. Why on earth would be asking a question like this if i hadn't???


Ah, well, that was because you were talking about LAFs but your post title said "Should I be using Swing for this?". Sorry for the misunderstanding.

I have heard of javafx before but hadn't looked at it at all, I had just seen it mentioned at the top of one of the swing tutorials on the the java tutorial (the official oracle one);

I'm just trying to get some information on something i will probably begin in a few months. I was getting ahead of myself, just forget it....


I sort of thought you were getting ahead of yourself, but on the other hand diving into something and finding out after six months that you dived into the wrong pool, that can be annoying. So yeah, I would say forget about web applications, they're going to be a dead end. Unless you happen to come across a web application which looks the way you want your application to look, that is. And as for Java FX, I have no experience with it myself but it seems to me they've done a lot of work in redesigning the UI so that setting it up is by configuration (like the XML which Android uses) rather than by programming. Only I think it's more like CSS than XML. Anyway since you have some time you might want to look into it a bit more closely.
Jack O'Connor
Greenhorn

Joined: Feb 17, 2013
Posts: 4
I sort of thought you were getting ahead of yourself, but on the other hand diving into something and finding out after six months that you dived into the wrong pool, that can be annoying.


That's why I was inquiring. I didn't want to start learning something I wasn't necessarily going to use straight away. Don't get me wrong, Swing will be valuable to have under my belt, but if it's of no use to something that I'm thinking of making in the near future, I'd rather learn it after what will be more valuable for that project.

As for Java FX I will look into it but I think for now I will stick with Swing.

Anyway, I have plenty of time on my hands at the moment to learn (hopefully) all of this stuff! I'm 16.

Thanks for your advice!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

If you decide to go the web app route, your front end will be HTML, CSS and JavaScript. If you don't want to write all that, tools like GWT can auto-generate it for you -- though I'm not sure that will give you the level of control you want.

Games can be successfully implemented as web apps -- see my Black Box™ implementation*.










* Which I'm currently re-implementing using a 100% JavaScript approach.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: Should I be using swing for this?