Click here to Skip to main content
15,881,755 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi I Need to design a front end for my java application. The front end looks somewhat like this:
In Panel 1:
Text
Text.....................................................Text
TextArea1...................Button1......................TextArea1
TextArea1...................Button2......................TextArea1
TextArea1...................Button3......................TextArea1


Text....TextBox1
Text....TextBox2............................Button1
Text....TextBox3............................Copyright Text


I ahve been able to get the boxes alright but arranging them properly is giving me lots of troubles.
If Possible please help me.
I am okay with backend but have no Idea of Swings.
The GUI i am getting is all hotch potch using Jpanel.
Arrangement in the designated format is necessary and binding.

[edit]SHOUTING removed, Code block added - OriginalGriff[/edit]
Posted
Updated 20-Dec-12 20:22pm
v2
Comments
OriginalGriff 21-Dec-12 2:22am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.

1 solution

A Visual Guide to Layout Managers[^]@ the Java Tutorials

Please be aware that you can combine the layouts. Each Area (probably JPanel) can have it's own layout:

Panel 1: Borderlayout
- North: GridbagLayout all "Text"
- West: "Textarea1"
- East: "Textarea1" (should probably be "Textarea2")
- center: Gridlayout or BoxLayout with Buttons

Panel 2: Gridlayout with specified column width


Some additional advice:
- build the layout step by step. use a "playground" project if you already have some code behind the GUI.
- Use background colors while creating the layout. You won't see the size of the panels otherwise.
- Not all Panels have to be in a single class. Especially static content is screaming for an own, fixed class.
 
Share this answer
 
v4
Comments
TorstenH. 21-Dec-12 4:04am    
Edit: Sorry for the edits, I was fighting with the editor...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900