Java Swing knowledge for a web-developer [closed] - java

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
There are many good books about Java and (almost) every one contains a big section about Swing.
I'm involved in web-development. Is knowing about "Swing" useful for Java web-development?

Applets can be embedded into a web-app., and applications can connect to them. Either provide a richer GUI than is possible with JavaScript/HTML, but unless they bring something specific to the web-app. (rarely the case), it is better to avoid the rich client GUIs & stick with D/HTML.

You could perhaps learn patterns that could be reused in a web application, but no, Swing is not used in webapps.

Probably not. Swing isn't used at all in web development, unless your web app involves Java applets -- Java GUI code which is downloaded to the client and run inside the web browser.

If you want to develop web application using a 'component' approach - like GWT - having knowledge of Swing can help you.
GWT or Vaadin framework are using widgets (window, panel, menu, text area) and layout them to organize the client view. The application is not going from pages to pages but instead have a single entry point that will show and hide windows and panels.
In this way they are very close to Swing (even if they are simpler to handle).
You'll find easier to switch from Swing to GWT (and vis-versa) than to switch from a page based framework (like struts) to GWT.

Understanding the concepts involved in Swing can help in understanding the concepts of Java Server Faces.
But no, other than in applets, Swing is not used for web development.

Related

Java GUI programming beginner tips [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Im quite good with writing text based programs using Java and ill like to proceed to writing GUI programs and animations ive checked several youtube playlists and they dont seem do helpful so i would appreciate any tips on where to start.
For desktop applications, You should start with Java Swing.
Swing API is a set of extensible GUI Components to ease the
developer's life to create JAVA based Front End/GUI Applications.
There are some good tutorials, I would suggest the following:
JavaTPoint and TutorialsPoint
After completing swing, you can move on to JavaFX.
JavaFX is a set of graphics and media packages that enables developers
to design, create, test, debug, and deploy rich client applications
that operate consistently across diverse platforms.
For that, you may follow to begin with
code.makery
Sounds as a great question, but not self explanatory. Before making assumptions just ask your self -
Do I feel myself as Web developer or a Desktop(Core) developer?
From a prospective of Desktop developer - take a look at Swing - it allows to make GUI forms and etc. If you decide to learn web, then take a look at Vaadin (which is made on top of GWT, and easier to dive in)..
Both of them have simlar syntax, so it would be always easier re-qualify...
UPDATE: While you still decide where to go, see this humble example of Vaadin Application

Should I keep using Swing for my desktop application [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I am currently working on an application with a code base that dates back to at least 2001. One of the components of this system is a desktop client that is written using Java Swing. It uses most of the good old layouts including BorderLayout, FlowLayout, and Gridbag layout. There are a number of fairly complex screens we need to manage and update periodically and we sometimes need to create new features with new user interfaces.
Is there something better than Swing we could look into migrating to?
Would it be possible to do this migration in stages (i.e. we would have a mix of the old Swing components with the new components during a prolonged migration phase)?
If we were to re-write the desktop client in Java today should we still use Swing?
I find myself using primarily GridBagLayout, is this still the tool of choice for more complex layouts or are there better layouts I could be using?
I was reading in book that Oracle intend to replace Swing by JavaFX.
Take a look in the question and answer bellow:
6. Is JavaFX replacing Swing as the new client UI library for Java SE?
Yes. However, Swing will remain part of the Java SE specification for the foreseeable future, and therefore included in the JRE. While we recommend developers to leverage JavaFX APIs as much as possible when building new applications, it is possible to extend a Swing application with JavaFX, allowing for a smoother transition.
You can see there original comment here.
In this case, I believe that you can consider to user JavaFX.
More details here and good examples here.
If you are using Java 8 you can use javafx for new componant. It's possible to use Swing componant with javafx.
you can still use java swing, but if you need to migrate you can migrate in stages using JavaFX (again a Desktop Client). if you need to use Web Client, then you could use GWT (this helps since the developers already have knowlege of UI Components) and GWT code is in Java and Javascript gets generated in Compile Time.
Java FX is more powerful and beautiful
We can say that swing is replaced with java FX.
Now a days no body is using swing because there are lot of advantage in java FX over swing
It has good feature called scaneBuilder we can just drag and drop the components to appropriate position so lot of time is saving.
Different type of layout are there to place the components attractively.
Impertinently we can use CSS to disign the UI so is more beautiful and attractive
we can integrate with web components also.
If you're redoing a layout entirely, I'd look at Matisse which uses Spring Layout.
https://netbeans.org/features/java/swing.html
It's far easier to get the relationships between components using a layout tool than trying to line everything up manually in GridBag or something similar.
If you're not redoing a major part of the code, I wouldn't touch it. Don't fix what ain't broken.
Regarding JavaFX, I personally have not been impressed by it. You can take a look at it, but JavaFX struck me as needing more "bake" time. I would not abandon Swing just yet.
If you need to have a Java desktop client looks like native application for some platform (Windows, MacOS, Linux) you can look on Standard Widget Toolkit (SWT) library.
One famous application example of usage of this library is Eclipse IDE. Another - Angry IP Scan, sources are at GitHub.

what are good options to create a portable standard desktop GUI application [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I want create a portable DeskTop Application with Graphical Possibility
I am Identifier with Swing,awt and Java FX
I think that i cant use awt because this don't work in all OS
but I don't khow what best option for my Application?
can I use both Swing and javaFx?
Is there other technology for create portable GUI Desktop Application ?
thank you
Swing is probably your best bet. AWT has no benefits anymore - Swing has superceded it. JavaFX is also a good option. The only problem with JavaFX is its low adoptability compared to Swing. There are very few expericned people in JavaFX out there. But JavaFX can embed Swing components.
Swing is very mature, and has a huge amount of information on the web.
SWT is another option, but with SWT you need to learn the RCP framework from Eclipse and that can take a while. Also, SWT is fairly restricting in what you can do. With Swing you have complete freedom.
That's about it for Java that i can think of.
I guess you are looking for a good GUI Framework for you JAVA Application.
AWT is totally outdated and was succeded by Swing.
You can use JavaFx and Swing together, for example, to integrate JavaFX in an old swing application.
An alternative would be to use SWT (like Eclipse).
Building nice looking GUIs in Java is quite a hard task. I would use JavaFX or SWT.
You can use the Google window builder available with eclipse. https://developers.google.com/java-dev-tools/download-wbpro Here are the details on how to install.

Quick to develop web app in Java [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I need to develop a basic web app very quickly (1 week) for a demo.
My requirements are
Java (I need to make use of existing Java libraries to access the relevant data)
2 screens
One for static data view, maybe some search parameters
Other for basic form entry
No fancy AJAX required
Ideally easy for a web designer to come in and tart it up as necessary, without having to rewrite everything
My first stop was going to be to checkout Wicket as I've heard good things about it. I don't have the time right now to dive into anything heavy, which probably writes off JSF in my mind (I played with JSF1, steep learning curve which I've now slid back down).
I'm happy to treat the result as throwaway so if there's a framework which starts of well but then doesn't scale up to bigger projects, that would be ok.
Any suggestions appreciated on frameworks/approach.
Spring roo can very quickly create web applications using GWT for CRUD, and tarting it up later. Check out the Keynote from Google I/O 2010 (Especially Day 1, Part 9) where the skeleton of a basic expense tracking application is developed from scratch in about 2 minutes.
GWT support is in Roo 1.1.0.M1
As a milestone release, Roo 1.1.0.M1 isn't intended for mission-critical use.
It is probably easiest to get in the form already integrated with the eclipse based SpringSource Tool Suite
I suggest the Play framework which has the huge advantage to be full Java (so less learning curve if you don't know Groovy). Check out the demo!
Use Groovy/Grails. Full access to all Java libraries and you will be done so much faster it will make your head spin.
This is from a hardcore java user, by the way. It's just not the appropriate language for most web apps.
Oh, you could probably also use JRuby on rails.
Google App Engine. There are some good video tutorials from Google that get you up and running in no-time.
http://code.google.com/appengine/
Intro (< 10 min): http://www.youtube.com/watch?v=bfgO-LXGpTM
Check out CUBA platfrom, it matches your requitements.
I can suggest GWT. It works on Google App Engine too if this is an internet app.

Compare SWT with SWING [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Is swt faster than swing?
Where can i get good tutorials
about swt?
it easy to migrate from swing
to swt?
See this web sites:
SWT, AWT and Swing
Swing vs SWT
Swing vs SWT(2nd)
Very nice webpages with example source code:
SWT
SWT 2d-Graphics
I think it's important to remember SWT came in to being when Swing was very immature and I guess the Eclipse folks thought it necessary to reinvent-the-wheel (suspect in retrospect that's something they regret, however thin a layer SWT is).
Nowadays Swing has matured, many of the problems and performance issues it used to have have been fixed and with the 3rd party extensions like JGoodies and JIDE I can't think of a good reason you would use anything but Swing for thick-client development.
There's a comprehensive tutorial here which takes you from 'Hello World' up.
Swing and SWT are two completely different APIs, although the principles are the same. MIgrating your skill is easy. Migrating a program, however, would be a lot of work.
I think you will experience some headache if application is to be run on different OS-es, dont know for now, but before there was no support for Mac OS, so forget about it if your app is to be run on Mac OS.
We also had this question in company and decided to go with Swing, because for normal desktop application you just cannot sense the speed difference which is supposedly on SWT side, and this speed you are buying with ruining WORA principle, you have to bring with your application needed .dlls or .so files to natively support your application running in desired OS-es.
For long time Swing part of Java (with printing) was weak point of Java. I think they will make much more out of Java if they succeeded to make Swing simple, intuitive and responsive at that time. Nowadays they made some positive steps in it, although still can be said, swing is big, complicated..

Categories

Resources