This little example will show you how to bind a JTextField to a name property of a Person with Beans Binding (JSR-295). First the Person: The code for the JavaBean Person is a litte bit cumbersome because of the PropertyChangeListener who will notify the Binding Framework if the model change. Swing on the other side …
format() from String or printf() from e.g. PrintWriter will use the default language except you give a Local object as the first argument: And the class Scanner offers nextDouble() that uses the default language too except you use useLocale(). The methods format()/printf() and the class Scanner are very handy and easy …
Die Standardbibliothek enthält 200 Pakete, die Java in der Version 6 deklariert. Sie beschreiben zusammen 3777 Typen, davon 2457 Klassen, 972 Schnittstellen, 49 Aufzählungen, 473 Ausnahmeklassen und 32 Errorklassen. Insgesamt gibt es 1482 Objektvariablen, 4408 statische Variablen/Konstanten, 21881 Objektmethoden in …
Objekte von Klassen, die eine finalize()-Methode besitzen, kann Suns JVM nicht so schnell erzeugen und entfernen, wie Klassen ohne finalize(). Das liegt auch daran, dass der GC vielleicht mehrmals laufen muss, um das Objekt zu löschen. Es gilt zwar, dass der GC aus dem Grund finalize() aufruft, weil das Objekt nicht …
Phys2D ist eine 2D Physik-Engine, welches Massen, Trägheiten, Reibung simuliert. Die Bibliothek ist in Java 1.4 programmiert und unterstützt Boxes Circles Static Lines Restituion and Friction Fixed, Elastic and Loose Joints Angluar Velocity/Momentum Simple API Quad Tree Collision Gideon Smeding’s Polygon Ein Demo gibt …
ShellEd (Bild) ist ein Shell-Script-Editor für Unix-Skripte (also ash, bsh, bash, csh, ksh, sh, zsh). Mit Manual und Vervollständigung. Interessant dazu ist das relativ unbekannte Target Management Project, wo man remote, etwa über SSH oder FTP auf einem Server arbeiten und zum Beispiel Dokumente editieren kann. Siehe …
Entwickler eigener Swing-Komponenten werden fürs Zeichnen auf getWidth() und getHeight() zurückgreifen. Wegen möglichen Insets sollte man jedoch beim Zeichen die Größenveränderungen betrachten.
A range is a very handy feature of programing languages like Python. range( 10 ) -> 0 1 2 3 4 5 6 7 8 9 range( 5, 10 ) -> 5 6 7 8 9 range( 0, 10, 3 ) -> 0 3 6 9 range( ‚0‘, ‚9‘ ) -> 012345678 And the main class Range
Dinge, die aktuell diskutiert werden und ich interessanter finde: The act of writing JSF applications and components „by hand“ will be made much easier by this JSR. Allow for „zero configuration“ web applications. No faces-config.xml, no web.xml. If necessary, annotations will be used to supplement the configuration …
Neue String-Objekte als Kopie von existierende Strings aufzubauen ist ganz schön übel. Aus javax.sql.rowset.RowSetMetaDataImpl: Wie die API-Doku zum Konsturktor so schön schreibt: Unless an explicit copy of {@code original} is needed, use of this constructor is unnecessary since Strings are immutable.