Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Online Training

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
 
Training Index

JavaBeansTM Short Course
Behavior: Inspecting Beans with BeanInfo and Juan Valdez

By MageLang Institute

[Tutorial Contents]
[API Docs] [Help] [Exercise] [Solution]

This program cannot be run as an applet. Please run Solution/Valdez from the command line as an application. Running the solution with no arguments results in Juan examining an TextField with the following being printed:

Bean Information for: class java.awt.TextField

	Properties
	----------
(1)	selectionStart - int - 0
(2)	enabled - boolean - true
(3)	text - class java.lang.String - Hello
(4)	preferredSize - class java.awt.Dimension - 
             java.awt.Dimension[width=0,height=0]
(5)	foreground - class java.awt.Color - null
(6)	visible - boolean - true
(7)	background - class java.awt.Color - null
(8)	selectedText - class java.lang.String - 
(9)	echoCharacter - char - ?
(10)	font - class java.awt.Font - null
(11)	columns - int - 5
(12)	echoChar - char - ?
(13)	name - class java.lang.String - textfield0
(14)	caretPosition - int - 0
(15)	selectionEnd - int - 0
(16)	minimumSize - class java.awt.Dimension - 
             java.awt.Dimension[width=0,height=0]
(17)	editable - boolean - true

	Listeners
	---------
(1)	text - interface java.awt.event.TextListener
(2)	mouse - interface java.awt.event.MouseListener
(3)	key - interface java.awt.event.KeyListener
(4)	component - interface java.awt.event.ComponentListener
(5)	action - interface java.awt.event.ActionListener
(6)	focus - interface java.awt.event.FocusListener
(7)	mouseMotion - interface java.awt.event.MouseMotionListener

Using the newly creatly Valdez.inspect method with the Burro interface will look something like this:

Copyright © 1997 MageLang Institute. All Rights Reserved.

[ This page was updated: 29-Sep-99 ]

Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World
FAQ | Feedback | Map | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-99 Sun Microsystems, Inc.
All Rights Reserved. Legal Terms. Privacy Policy.