Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Learning Java GUI question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Learning Java GUI question



> are we able to paint afterwards the loaded component in order to obtain

nib4j provides two ways to include your own custom components:

1) Replace a component before the creation of a window:
    nib.replaceComponent(³aLabel², new MySpecialLabel());

For this approach your custom component must extend the related Swing
component that is used by default.

2) Drag a custom control in your UI window and set the full qualified class
name (including packages) of your custom component as the Class ID. The
custom component must extend JComponent.

To test your custom controls within nib4j Viewer copy the necessary classes
into a folder called CustomControls. If the folder does not already exist,
just create one in the same directory where your copy of the nib4j Viewer is
located.

Manuel





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Learning Java GUI question (From: Yvon Thoraval <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.