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.
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.
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.
Greg Funston SCJP
Joined: Jun 13, 2009
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.