jQuery in Action, 2nd edition*
The moose likes Swing / AWT / SWT and the fly likes GIU troubles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "GIU troubles" Watch "GIU troubles" New topic
Author

GIU troubles

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.


I originally posted this in the SCJD section and Roel replied. I am having trouble implementing this interface. I have got the bottom and middle working but I cannot seem to get the top section to work. I have been working on this for hours and not making any headway. If someone knows of a good place to find sophisticated tutorials on GUI development using panels I am all ears or if you have any specific advice on how to create a GUI similar to this I would appreciate it.
Greg Funston
Ranch Hand

Joined: Feb 09, 2011
Posts: 81

So far my method has been to create a panel using BorderLayout to hold 2 other panels. This worked well. I added 2 panels and it works(one SOUTH and one CENTER). The bottom 2 buttons are there and the JTable is there as well. The problem occurs if I either try to add a top panel as NORTH or a new CENTER panel with 2 panels in this(One panel for the table and one for the top panel).When I use the 2nd method with a GridBagLayOut my table ends up small and centered. I am not having luck with either method.

This looks like it should not be too difficult but it is giving me grief.

Any ideas or suggestions are welcome.

Cheers,
Greg Funston SCJP
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2153
    
    7
When I use the 2nd method with a GridBagLayOut my table ends up small and centered


Read the section from the Swing tutorial on How to Use GridBagLayout. It explains why the component become centered. I think you need to specify a weightX or weightY value.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

Please UseAMeaningfulSubjectLine. GUI troubles isn't really telling us anything, is it?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: GIU troubles
 
Similar Threads
GUI design choice for the SCJD
Cleared SCJD (UrlyBird 1.3.3) with 381
Having trouble adding a top panel to my GUI
NX: Assignment questions
Gui Re-Implementation or Modification