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



Hi Manuel,

Just curious: if I use classes of my own application (as opposite to Swing-classes of the JDK) in the GUI, how the class names are stored? Is it still possible to easily obfuscate our application (except the main class) or should I also avoid obfuscation of the used GUI classes?

Another issue: for example, our JTable-subclass requires a table model as constructor parameter (we love final member variables). Am I possible to use it with nib4j?

--
Best regards,
Thomas Singer
_____________
smartcvs.com
smartsvn.com


Manuel Hermann schrieb:
Agreed IB is a great tool (especially for Cocoa development) however
the nib4j tool turns a nib into source code which is a very un-IB
like thing to do.


Please let me revise some statements about nib4j.

First of all, nib4j doesn't generate source code out of a nib file. All nib
files are loaded at runtime and the Swing GUI will always be created on the
fly.  The built-in internationalization mechanism determines which nib files
are loaded.

So, there are just a view lines of code needed to load a nib file and show a
frame:

// load nib file
NibFile nib = NibService.loadNibFile("Test");
// create and show frame
JFrame win = (JFrame) nib.createWindow("TestWindow");
win.setVisible(true);


It's of course true that one has to use a Mac to design the interface. But
the created Swing GUI is cross-platform compatible. On Mac OS X nib4j uses
SpringLayout to build the user interface. On every other system the famous
FormLayout (https://forms.dev.java.net/) is used.

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: Manuel Hermann <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.