Programming - Java Beans



Beans Interfaces

Although the 3D part of the program does not use conventional GUI components, I think there are still advantages in breaking the program into components based on the Beans interfaces.

 

 

Requirements for beans

  1. constructor with no parameters
  2. must support seriailization or externalization
  3. must be able to run in design environment

Ways to initialise a bean

first way: (not if hidden state property is set in feature descripter attribute-value.)

wombat w = new wombat(); <-- constructor with no parameters

w.setBackground <- set each parameter from propertyEditor.getInitalisationString()

Second way: (can allways do this)

wombat w = new wombat(); <-- constructor with no parameters

call serialisation interface.


use of beans in mjbWorld


metadata block
see also:

Beans in mjbWorld -- Architecture

Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover This book may be useful if you are using JBuilder. Learn Java with Jbuilder 6 - Introduces Java language and Swing from a practical, step by step, rather than theoretical point of view. JBuilder 8 has now been introduced so there may be a few difference if you are using the latest version of JBuilder.

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to this site, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

cover JBuilder - There is also a free version of Jbuilder at borland website . However its licence conditions are quite restrictive so you may prefer another java IDE.

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2015 Martin John Baker - All rights reserved - privacy policy.