wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Gui Re-Implementation or Modification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Gui Re-Implementation or Modification" Watch "Gui Re-Implementation or Modification" New topic
Author

Gui Re-Implementation or Modification

Tahir Abbas
Ranch Hand

Joined: May 05, 2007
Posts: 44
Hi,

I started B&S2.2.1 last year when it was almost complete, atleast 75%. I went overseas, after that I didnt do anything on my assignment now may be after more than a year and half I restarted it. Now many times I get confused to modify it or do it from scratch.

In my gui interface of that time i used toolkit.getScreenSize() and setBounds() method but now after reading many posts and the opinion of my javaranch fellow, Gert-Jan den Besten, I have to decide whether to keep may old implementation or make a new one with Swing LayoutManagers. If i redo with Swing LayoutManagers then which IDE will be more suitable for this, i think NetBeans.

my friends what do you think does it worth to redo all the gui implementation or modify it.

Best Regards!
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2234
    
    7

Howdy Tahir,

First what have you used for your existing gui implementation? Fixed positioning based on screen resolution?

Using layout managers is the way to go for each individual frame/dialog/panel component. The toolkit methods simply set the outter bounds or position (eg center of screen) when the window first loads, when maximizing the window may change the layout effect. Of course you can always forbid those buttons especially for dialogs (I did that and that's possibly why I lost 10 points for gui).

The user friendliness is a key when doing gui design. Are buttons enabled when they shouldn't? Is grouping the book/search etc buttons a good idea? Is modifying the table directly a good idea?


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
Tahir Abbas
Ranch Hand

Joined: May 05, 2007
Posts: 44
Thanks! K. Tsang for the response.

I used toolkit methods to get the screen size then according to components i generated form window. In form window i placed all components on proper location with the help of setBounds method. In setBounds method i passed parameters according to coordinates obtained from toolkit method. Before this i set panel.setLayout(null) I also used buttonGroup to form set of relevent componetns.

In this approach components sizes do not change on maximizing the window. The components stay on thier location with their original size but window increases towards left or right .

This approach looks different to Andrew's Book. He used FlowLayouts.

I am not sure these components sizes and other text will display properly when resolution and screen size will change. Infact Now this is not looking me very good approach. But if you, dear fellows, think it is enough to get the certification then I'll prefer not to improve this, Because now I want to complete this certification as soon as possible.

Regards!
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2234
    
    7

I see you are currently using the null layout. Have a look at this thread to see if you want to change it.

IMHO given you have your server side all good and nice (especially locking), then I would redo your gui to use layout managers. Layout managers would make the code look neater I think and easier to maintain (since the scjd assignment can be maintained by junior programmers accordingly to instructions).

So at the end, you need to make the decision.
 
wood burning stoves
 
subject: Gui Re-Implementation or Modification
 
Similar Threads
GUI based webserver servlet access
How to debug a swing GUI in Eclipse
Gui Implementation
Why insist in writing Swing by hand after the NetBeans5.0?
Few hours ago