Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Learning Java Swing (GUI builder or not?) [closed]

Well I know basic Java and wanted to learn Swing so of course looked at the Sun website first, where this tutorial is. I was going to start it but realised it relied heavily on NetBeans, which I'm not sure about.

I'm not sure because it's learning that I want to acheive, not a nice looking program.

So I thought using NetBeans like this would be great once I know it, but I don't want to be building things without a clue what's going on underneath, and of course this could also cause problems later.

My first question is is this the right way to do it, should I try not to rely on an IDE heavily? Looking through questions on the site most people recommend using the Sun tutorial, and I've only seen one answer that agrees with what I'm thinking, and they linked to this resource which looks promising. Or perhaps I'm getting the wrong idea of the Sun tutorial, perhaps it doesn't rely on the IDE, it just seemed like that.

My second question is, if you agree with me, what resources (apart from the one above) would you recommend?

Thanks for your answers.

like image 587
Paul Avatar asked May 18 '10 23:05

Paul


3 Answers

I wouldn't say that Sun relies on NetBeans in their tutorials as much as references NetBeans because NetBeans is Sun's IDE.

I use Eclipse for my Java development. A good IDE can help you with the busy work, so you can focus on the problem at hand.

If you want to learn Swing, I recommend The Definitive Guide to Java Swing, Third Edition. This book takes you step by step through layouts and widgets, using and reinforcing the MVC pattern of GUI development.

For the advanced Swing developers, I recommend Swing Hacks: Tips and Tools for Killer GUIs. This book shows you some tricks to make your GUI pop.

like image 84
Gilbert Le Blanc Avatar answered Sep 23 '22 22:09

Gilbert Le Blanc


The tutorial predominantly is about code. It's really just the one chapter on NetBeans. The rest of it is about Swing and can be done in any IDE.

I would not recommend working with a GUI builder, simply because as you say, you don't get to understand what's going on underneath. Start with simply windows and progressively work you way through adding GUI components and interacting with them. Understand the advantages of the MVC way of doing things.

And the best recommendation I can give is don't sit down to "Learn" Swing. Pick yourself out a project that interests you and you can do using Swing. By having a goal of a working program in mind, you will better absort the lessons that the tutorials give.

like image 32
drekka Avatar answered Sep 23 '22 22:09

drekka


It seems you are a beginner in swings. I would recommend not to rely on Netbeans to develop swing UI. Try to design the UI by writing code only. This will improve your knowledge base on swings and then you can go using the GUI builder available if you so wish.

like image 42
Ravindra Gullapalli Avatar answered Sep 24 '22 22:09

Ravindra Gullapalli