• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Rich Client GUI

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I am about as green as you get. I have experience programming in a couple other languages, but no Java.

I want to write a simple desktop application. Which framework (is that the right term?) should I use? JavaFX? Swing? etc...?

Does it matter?

Thanks,

Craigbert
 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Craig Boyd wrote:Hello All,

I am about as green as you get. I have experience programming in a couple other languages, but no Java.

I want to write a simple desktop application. Which framework (is that the right term?) should I use? JavaFX? Swing? etc...?

Does it matter?

Thanks,

Craigbert



Swing would be best, I'd recommend you get an evaluation version of JFormDesigner for the GUI development and download FatJar to bundle and deploy your application as a JAR file. With those two it's as simple as it gets.
 
Craig Boyd
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Gerardo, I will check both of those out!

Craigbert
 
Ranch Hand
Posts: 525
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Craig : Welcome to JavaRanch. Be sure to come back here
with questions about your project. The details of GUI design
can get a bit frustrating (in my experience, anyway) and you
will find many helpful folks here.

Jim ... ...
 
Craig Boyd
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jim. That is really good to know.

Craigbert
 
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gerardo Tasistro wrote: . . . I'd recommend you get an evaluation version of JFormDesigner for the GUI development and download FatJar to bundle and deploy your application as a JAR file. With those two it's as simple as it gets.

But if you don't write code by hand, you will never understand what is going on. Avoid such automated tools like the plague until you are much more experienced.
 
Gerardo Tasistro
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Gerardo Tasistro wrote: . . . I'd recommend you get an evaluation version of JFormDesigner for the GUI development and download FatJar to bundle and deploy your application as a JAR file. With those two it's as simple as it gets.

But if you don't write code by hand, you will never understand what is going on. Avoid such automated tools like the plague until you are much more experienced.



I've never found any value in writing that type of code. He'll have plenty of time to write code to handle the actual things the buttons will be doing. I believe frustration levels rise to quickly with GUIs if everything is written by hand.
 
Campbell Ritchie
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see what you mean, but what happens when something goes wrong with a layout and you can't understand the code?

I think this thread would sit better on our GUIs forum, so I shall move it.
 
Craig Boyd
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Campbell & Gerardo, thanks to both of for your thoughts and input.

I am the kind of person that loves to find something that works and then take it apart to learn the how and the why. But having said that I also like to roll up my sleeves and dig in, so you can both be assured that I will be taking both approaches as I begin my Java learning experiences.

Thanks,

Craigbert.
 
Gerardo Tasistro
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:I see what you mean, but what happens when something goes wrong with a layout and you can't understand the code?

I think this thread would sit better on our GUIs forum, so I shall move it.



JFormDesigner keeps the initialization code very well contained and easy to read. If you read into it (and you can by just going into the init() method) you'll only see a series of variable initializations and layout configurations. It's the type of thing that's nice to go "oh wow that's how you do it, ok now back to work". When you add an action listener or method to respond to a button click or whatever all that happens is that said method stub is written for you with a nice // TODO ... . Once again something that's nice to see once and that's it. Since it isn't intrusive you can delete the original JFormDesigner file and work on from your java file.

If something goes wrong with the layout there's no way you can't understand the code unless you can't read Java.
 
Jim Hoglund
Ranch Hand
Posts: 525
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gerardo Tasistro wrote:... If something goes wrong with the layout there's no way you can't understand the code unless you can't read Java.


Gerardo : I guess that's just Campbell's point; that a beginning programmer can't read Java.
Keep in mind that a beginner does not know initialization code from today's rainfall, or a panel
layout from a shoe-shine kit. So what is a JFormDesigner anyway? Is it something a seamstress
would use? I'm sure you get the idea. So Campbell's advice makes a lot of sense, at least until
a novice can spell IDE.

Jim ... ...
 
Gerardo Tasistro
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jim Hoglund wrote:
Gerardo : I guess that's just Campbell's point; that a beginning programmer can't read Java.
Keep in mind that a beginner does not know initialization code from today's rainfall, or a panel
layout from a shoe-shine kit.



That's exactly my point. It's already a steep learning curve as it is. Let him use a nice drag and drop tool to do all the grunt work and then let him dig into the code once he understands the issues I find more important like events, updates and threads in a GUI. Not to mention friendly user design.

Not using a tool like that leads to a loss of time manually adjusting settings then previewing then adjusting then previewing. I find no merit in a trial an error GUI design methodology just because. I can understand Prefered Size from the manual, but I can't really visualize 250,40 or 220,60. Although I usually support the learning of the underlying technology in this case I don't. I find it the equivalent of teaching architecture by looking at the data structure of a CAD file. There is so much involved in the GUI that is visual and represented by parameters that not using a tool like that is counter productive. We're not developing a class hierarchy than can visualized in one's mind. This has to be previewed, touched, looked at, changed, previewed again etc. In general I believe GUI design is more an exercise in aesthetics and usability than code writing.
 
Jim Hoglund
Ranch Hand
Posts: 525
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's drag and drop? What's an event? And what is a thread? I guess
it's hard to remember what it was like when you knew absolutely nothing
about a topic. mmm... where to begin?

Jim ... ...
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe it's user preference. I learn better by writing the code. And in fact, I hate tools like JFormDesigner. Not because there is anything wrong with the tool, but because of what it does. Other folks love those kinds of tools. The best approach is to try it both ways and figure out what works best for you. You guys will continue to go back and forth until you realize this. There is no right way for everyone.
 
Gerardo Tasistro
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gregg Bolinger wrote:I believe it's user preference. I learn better by writing the code. And in fact, I hate tools like JFormDesigner. Not because there is anything wrong with the tool, but because of what it does. Other folks love those kinds of tools. The best approach is to try it both ways and figure out what works best for you. You guys will continue to go back and forth until you realize this. There is no right way for everyone.



True, although there is no "best way" there is usually a "deadline". I enjoy writing a lot of the backing code like table, list and combo data models, fire events etc. But figuring out if 125 pts width will allow the text "Click to accept order" to fit my button is well needless in my opinion. That task is best handled visually by a tool like JFormDesigner.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gerardo Tasistro wrote:That task is best handled visually by a tool like JFormDesigner.



For you, yes. And there are probably a handful of cases where I could say the same thing. That doesn't mean using JFormDesigner blindly is always the best option. To each his/her own.
 
Campbell Ritchie
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My, I really set off the discussion there, didn't I!
 
Jim Hoglund
Ranch Hand
Posts: 525
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, and all Craig wanted to know was how to get started. Interesting crowd, these JRanchers.

Jim ... ...
 
Craig Boyd
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was not expecting this much discussion of my question, but THANK YOU!!!
I was only expecting one or two posts. I hope all of my posts generate this much discussion because I will learn SO MUCH MORE!!!

Thanks all!

Craigbert
 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Craig,

I think at least to begin with you should create your GUI code 'by hand', without special tools, otherwise you could get confused. Building reasonable GUIs in Swing by hand is really not too difficult and you will soon get the hang of it....maybe then you can move to a GUI tool if that's your preference.

I work a lot with Swing and also the Java2D graphics API developing fairly complex GUIs and, after several years of doing this, I still prefer to code by hand. Just dig in and build some stuff!
 
reply
    Bookmark Topic Watch Topic
  • New Topic