Reputation: 139
I'll try to be as specific as possible.
What I currently know:
I am good at programming(JAVA) i.e. logics, algorithms, etc and when it comes to gui I am good at event handling and I can do it all through manual coding, but the problem I face is in designing the gui itself.
I always rely on the windows builders of netbeans and eclipse to make my gui i.e. positioning of the components, etc.
My Question:
I want to make the gui on my own as well and I have studied all the layouts but the problem is that no matter what I do? no matter which layout I use I can't position any component at the exact location like the IDEs.
For e.g. if I use any particular layout and position a component(for e.g. JTextField, etc) I am not able position it at the same location as the free designing(drag and drop) of the IDEs do.
Please suggest me what I can do or what I can study to make a gui just like the IDEs do but by manual coding, I am a student and I want to improve myself.
Thank You!
Upvotes: 3
Views: 557
Reputation: 1250
GUIs in Java applications are made using Swing. It seems your problem is making the interfaces visually appealing? That's what the drag-and-drop GUI builders are for. They help you quickly generate screen layouts (code is generated automatically and is modifiable).
You should try using Eclipse's Window Builder
Study any concepts of relative or absolute layouts relevant to Swing. This will help you position widgets within your GUI.
Java provides some standards or "best practices" for GUI design
Window Builder is very helpful, but to position and modify size of widgets you must know what attributes are related to that widget, this is provided in Oracle's Swing documentation.
For starters, skip the builders and start writing code on your own. Then refer to documentation on how to move those components and position them in the window as you want. There are plenty of code samples and tutorials available like this one
Upvotes: 1