aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Having trouble adding a top panel to my GUI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Having trouble adding a top panel to my GUI" Watch "Having trouble adding a top panel to my GUI" New topic
Author

Having trouble adding a top panel to my GUI

Greg Funston
Ranch Hand

Joined: Feb 09, 2011
Posts: 81

Hello all. I have spent quite a few hours going over GUI design. I look at Roberto's Figure 13 in his paper Demystifying the SCJD and it has a very nice look and feel to it. I always like to provide as nice an interface as possible but this looks a little more than is required to meet the requirement in this assignment. The SCJD assignment specifies that "You are permitted to use any IDE tool you choose, but you must not submit any code that is not your own work". I take that this means using the IDE to help generate code for a GUI is out. I am wondering what other members who have successfully passed this certification have done regarding GUI layout and design. Comments are much appreciated regarding the GUI Layout(GridBagLayout etc.) and the method with which you accomplished the design.

Cheers,
Greg Funston SCJP

PS- When it comes to GUI layouts I am a newbie so please be as detailed as possible(within reason of course). Also I am willing to do whatever work is required. I just need to be pointed in the right direction to minimize the amount of work this will take.


Originally posted in the SCJD section. I have been working on my GUI and the next post lists my current situation.
Greg Funston
Ranch Hand

Joined: Feb 09, 2011
Posts: 81



Here is my code so far. I cannot seem to get any method I have tried to add a simple top panel so I can put in 2 labels , 2 text fields and a button to top off this GUI and have it looking similar to the GUI I am trying to simulate. Any suggestions so I may finish this GUI and move on to the next step is well appreciated. In the meantime I will continue to look for a solution.

Cheers,
Greg Funston SCJP
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2177
    
    7
I cannot seem to get any method I have tried to add a simple top panel so I can put in 2 labels , 2 text fields


I don't see anywhere in you code where you even create labels and text fields.

> and have it looking similar to the GUI I am trying to simulate

I have no ideas what you are trying to simulate (and no I'm not going to look through that large document you posted because I don't know what page or image you are referring to.

I can only give general advice. Create a "topPanel". Add components to the panel and then add the panel to the BorderLayout.NORTH of the GUI. Once you do this you can explain what problems you are having and describe what you are tyring to achieve.
Greg Funston
Ranch Hand

Joined: Feb 09, 2011
Posts: 81

I have resolved my issue. The item was in figure 13 as stated.

Cheers,
Greg Funston SCJP
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Having trouble adding a top panel to my GUI