I'm trying to learn swing and I was thinking you guys may know a really good swing based open source application that I could study and inspire from. I'm looking for something that has a real world use, not just some concepts explained (like examples in most books and tutorials).
Thank you!
It's certainly less well-known than some of the other projects mentioned here, but have a look at GoGrinder. The code is well written and documented.
It might also be a good idea to look for something that you'll actually use. I find it easier to read the source of applications that I'm familiar with from using them.
In the same spirit as the answer suggesting to check NetBeans, I would suggest to get the sources of IntelliJ IDEA Community Edition and IntelliJ Platform from their git repository. At some point, IDEA was IMO a state of the art Swing application (fast, responsive, not ugly, nice user experience, etc).
Maybe you could have a look at the open source NetBeans IDE. It is huge, but it is using Swing intensively and is well designed and documented. Moreover, it is also a generic platform to build modular GUI applications.
The Swing Tutorial is filled with excellent code, and the Swing code itself is available for study in most IDEs.
jEdit is a programmer's text editor that I wrote some plugins for a few years ago. Partially due to the plugin system, the code is well documented, and after having been in development for many years is generally very high quality.
You could take a look at the jgoodies examples. They are not plain swing though, and I don't know the license.
Related
Our team is developing a Eclipse based IDE (typically a plugins), currently we are progressing good but I feel somehow we are feeling smell of bad practices in code. Example I can give here is, eventListeners :
Consider we have button named button1 and in the same java file (just below the button) we are adding selection listener to it like:
button1.addSelectionListener(new SelectionListener() {
//Remaining code here
}
Which I feel is completly bad idea, and my question, is there any design pattern, best practices etc available for eclipse plugin development? Or do you have any small tips/suggestions for the same? I know there are books available like Code Complete 2 etc etc, but I need bit suggestions respect to eclipse plugin development.
I tried in Google and didn't get much good informations regarding same, I got this IBM's article. But I feel it's not very useful, any suggestions or tip is appreciated.
Note: Please let me know if it is not appropriate here or is it good for anyother stackexchange networks (like programmers), I can move it there.
After several years of plugin development, I find these resources to be most useful for me when I find myself struggling on how to implement new feature:
Eclipse sources. Nothing will beat this. Try to find some already existing analogic part of what you're just doing and look how Eclipse developers did it - what patterns and extensions they used and so on. Helps to keep you plugins consistent with other parts of Eclipse. Eclipse Plugin Spy is your friend here (Alt + Shift + F1/F2).
Platform Plug-in Developer Guide - will guide you through basic concepts of Eclipse, like how to create menus properly, implement an editor, or save user preferences.
Eclipse Plug-ins (4th Edition) - Well known must-have for plugins developer.
And, of course, Stack overflow :)
I like to add some more resources that I have found useful to dreo's answer. The eclipse sources are invaluable, if you want to understand something in detail. To understand global concepts however, I suggest to read as much tutorials as you can. I can recommend the following websites:
Eclipse Corner Articles Has a lot of tutorials ranging from basic concepts to plugins specific topics.
Vogella Eclipse Tutorials Also a good tutorial website. It deals with a lot of topics that are important for Eclipse RCP development.
SWT Snippets More than 100 code snippets. Really useful, if you want to learn more about SWT and its capabilities.
The Official Eclipse FAQs Last but not least, I can recommend the official Eclipse FAQs. They provide compact solutions for a variety of topics.
I have started at a new firm and as part of my duties am making small changes on a Java Project that was developed previously. The problem is that it is mostly undocumented and very complex. By undocumented I mean no comments, no Java doc, no documentation guide, nothing. It's a website Java project developed in Eclipse and built using Ant. My question is what tools are available to help me map out the project to better understand it. Or is there any advice on the best set of steps to follow.
Thank you for your time.
Look into reverse engineering tools that can create UML diagrams for java, like omondo. If the ant build script is complex aswell - I once visualized some complex ant build script using yEd, that helped a lot.
I personally found that UML-based tools do not scale well in such cases, except for some very specific cases, where sequence diagrams might help a lot.
Instead, I would refer to the following book (available online) for a general approach to the problem:
http://scg.unibe.ch/download/oorp/
And try out some research tools for code visualization to get an overview, for example:
http://www.inf.usi.ch/faculty/lanza/codecrawler.html
(would love to post more links, but can't due to stackoverflow's spam prevention mechanism)
I'm in a project with WindowBuilder Pro, and while trying to get a good grip of it I've been searching forever for good documentation without any luck.
The best that I've found is Googles WindowBuilder Pro Infopage but that isn't extensive enough for me.
Does anyone know any other good documentation?
Or am I perhaps a bit off track here? I have very limited Swing-experience, and perhaps I'd be better off studying the SWING API instead of looking for WindowBuilder documentation?
Very thankful for any tips.
The WindowBuilder docs that you reference are quite extensive (nearly 300 pages), but they are intended to be docs about how to use WindowBuilder itself. They are intentionally not intended to be documentation for the Swing, SWT or GWT APIs and should not be considered to be substitutes for those. There are plenty of good sources of information on those APIs.
If you are interested in info on Swing, the primary source should be the docs and tutorials provided by Sun/Oracle. Once you have a basic understanding of Swing itself, I think you will find the WindowBuilder docs to be of great help in learning WindowBuilder which itself will be great help to you in rapidly creating Swing UIs.
I should also point out that the WindowBuilder docs in place today are actually better than those in place prior to the Google acquisition of Instantiations because they represent a further six months of work and refinement. While the product has seen a change in legal ownership, it has not actually "changed hands" in the literal sense. The exact same team that developed the tool at Instantiations has continued to work on it at Google and is also forming the core of the committer team at Eclipse.org. This continuity of development stretches eight years into the past and will continue well into the future.
This is in a really early stage but this is something that we have been working on which might be helpful for you: http://www.codemaps.org/s/WindowBuilder
WindowBuilder has changed hands several times in the last 12 months (from Instantiations to Google, followed by Google giving it to the Eclipse Foundation). Admittedly, the documentation appears to have suffered. However, as the project is still in the process of being provisioned to the Eclipse Foundation, the best place to search for documentation should be the Eclipse WindowBuilder Documentation Page, which is available from the Eclipse WindowBuilder page. Currently, the documentation page only lists the Google InfoPage that you've mentioned, but I suspect that in time the documentation will increase greatly in quality.
That being said, there is no substitute for a solid understanding of the underlying technology that you plan on using within WindowBuilder, be it SWT, Swing, or GWT. WindowBuilder will make some things easier, but many of the features will be confusing if you don't have a firm grasp of the underlying concepts. Sadly, most tutorials are still centered around hand-coding the GUI, so there is an opportunity for an enterprising documentation/tutorial writer to provide a gateway to those who wish to learn technologies like Swing and SWT using WindowBuilder.
Yea, leave the WindowsBuilder behind. The Swing tutorials are excellent: http://download.oracle.com/javase/tutorial/uiswing/
I want to know which is the best tool which can be used to make GUI . Currently I'm working on VC++ 6.0 and I can't give a good look(Vista Look) in that.
So can anyone help me which one will be more suitable for GUI .. Java or any other tool(.net WPF) and if you can give the reason then it is very helpful.
Thanks
I would recommend WPF .. It has the new markup language which suits well the UI development, supported by code behind.
Check some examples http://blog.trivadis.com/blogs/manuelmeyer/archive/2008/06/12/cool-wpf-samples.aspx
Java is designed to work well across multiple systems.
.NET underlies Windows.
If you're trying to imitate Vista's look and feel as closely as possible, go with the framework that was written by the same company that also made your operating system.
Any of the above are capable of a good "Vista" look (including VC++). You just need to opt-in to the new visual control styles with a manifest. WPF will have the most options for a "sexy" Windows UI, and won't need the manifest.
You can use WPF for serving your purpose. WPF lets you
edit the opacity of the elements : so that you can create transparency effect as in Vista
create storyboards for your animations
change the look and feel of existing controls using styles, so it can be easy to create Vista style controls
apply bitmap effects such as Outerglow, Dropshadow, etc.
Although WPF is not limited to the above features, but it is the partial list of features for which you can use WPF to achieve your desired effect.
If you do decide to go down the Java route, take a look at the JGoodies libraries. They take a lot of the pain out of writing Swing apps by providing (amongst other things) a much more usable layout manager, a data binding framework, and some some Windows like look & feels.
Take a look at this to see why you don't want to use one of Swing's standard layout managers directly...
Depends on what you mean by "best" tool.
In Java you are most likely looking at Swing to develop your application as far as frameworks go. If you are looking for a complete RCP, you could take a look at the Netbeans Platform or Eclipse RCP. The Netbeans IDE also has a nice GUI editor that can be used for generating Swing GUIs (if you don't mind working with generated code and the Netbeans IDE).
WPF is very nice but has quite a large learning curve.
Swing is a bit chunky.
7 years ago at least Delphi was a really really polished and good way to produce a windows GUI, since then Delphi has moved to be a .net laungage. So I would recommend at least looking into Delphi
The tool decision should follow your requirements.
Do you need a GUI for a stand-alone Application or a client-server architecture? If it's stand-alone, do you need it for a single operating system or you need it portable? If it's client-server, do you want a thin client ('webapplication') or a rich client, if it's a rich client, you want the user to install it or shall it be provided by a webservice?
Do you want to hardcode the GUI or declare it? Do you have some expert knowledge on a certain programming language or a certain framework or do you want to use the project to learn on or the other (or both)?
I think, it's much easier to recommend something when we have some more background information.
From the few things I know I suggest:
Upgrade your visual c++ environment and keep working with the tools and frameworks you already know. Microsoft products should be the best solutions to develop applications for Microsoft operating systems.
I would recommend Flex with Adobe AIR - it's nice! adobe flex
I'm developing a Java ME app & need pointers to some really good UI libraries. I did see a few such as Java ME Polish. Are there any more out there? For e.g. ebuddy's java ME app has an amazing UI and so is gmail's java ME app. What libraries would they have been using or would have they have developed it on their own?
Sun recently released and opensourced their solution to crappy looking lcdui. It is called LIghtweight UI Toolkit and can be found on lwuit.dev.java.net
We have been trying lately on kuix.. So far so good and more light weight than LWUIT
code.http://code.google.com/p/kuix
eSWT would be available for MIDlets on the latest J9 VM, as used by the Series60 3rd Edition feature Pack 2 handsets (Nokia N78, 6210, N96...) but we're mainly talking about nicer looking UI controls. Basically, a MIDlet can look much more like a native application now.
Sun has recently open-sourced LWUIT.That could also be worth a look.
Nothing beats drawing your own images on a Canvas,though. Generic layout managers in any kind of library will only get you so far. You should only look at the available technologies once you have a good idea of how many different kind of screens your application should have and what they look like.
Most of the apps with amazing UIs (Opera Mini, Gmail, any game from an AAA developer) use custom UIs developed in-house. These developers take the task of developing an UI as one more in their projects and give it personality, involving professional graphic designers. Going with a packaged library would quickly accomplish the task but it would make the application look generic and bland (less bland that with the default UI, but still bland and limited).
In short, go with a packaged UI for quick development, but don't expect the level of quality to be near the apps you mentioned.
I'm facing a similar dilemma right now. We're currently using the default, high-level LCDUI framework for the speed of development, but its severely limiting what we can do. I had thought our best option would be to use a third-party UI framework, but I'm now coninced that if we're serious about the application we should write our own. Its like anything in software, if its mission critical to your application you should write it yourself, even if it that means re-inventing the wheel.
Digitalapes has developed a framework for J2ME application development that includes a high level UI library.
The library is lightweight and well documented, you can get have a look at the Gear framework page for more information, or you can directly download the JAR and javadoc from Gear's sourceforge page.
Digitalapes blog includes also a series of tutorial about how to use the framework.
Polish has really nice set of UI components, which are skinable with css style comments.
It also features a device database for compatibility purposes.
Some tipps if you decide to go with polish (as i did):
Use eclipse and the mepose plugin. The netbeans integration is really nerve wracking.
The bulletin board is dead, so by all means !use the mailing list!.
If you are not familiar with the ant building system, you better start now.
The J2ME Polish book is not worth its money. (My opinion). The documentation on their website and the sample coded are enough to give you a solid start.
I've used SWT when deploying to a full profile J2ME (IBM J9 on PocketPC), I don't know if it is usable by MIDlets however. It's quite a nice GUI library in its own way, and far better than AWT.
Unfortunately companies usually end up designing their own GUI's when it comes to mobile development. It's the only way to have full control over your interfaces, but you should consider if it's worth the additional development time, and you're also on your own when it comes to device compatibility issues / handset bugs - of which there are plenty.
If you are happy with a less flexible interface, you can go with one of the existing libraries. I currently use J2ME GUI from http://www.garcer.com/. We get the same flexibility as with desktop development and it also features custom styling, so with a little extra effort you can make it look the way you want it to.
You can use LWUIT for the UI development in J2ME framework.