Loading…
Loading…
Java
The advanced-libraries companion to Core Java I: streams, files, regular expressions, XML, networking, databases, date & time, internationalisation, security, desktop UIs and the Foreign Function and Memory API. Targets Java 25.
Advanced FFM calls: passing Java code to C as function pointers with upcall stubs, binding objects and lambdas, calling variadic functions such as printf, capturing errno and GetLastError, and a C library that calls back into Java. The final article of the course.
kvi5hnuCode Sprout team member15 minCalling C functions from pure Java with the FFM API: the native linker, default, library and loader symbol lookups, function descriptors, downcall handles, invokeExact, pointers and NULL, struct results, critical calls, enabling native access, and generating bindings with jextract.
kvi5hnuCode Sprout team member17 minDescribing C data with FFM memory layouts: value layouts and C types, struct and union layouts, alignment and padding, sequences, layout paths, var handles with base offsets, offset and slice handles, pointers with target layouts, and atomic access modes.
kvi5hnuCode Sprout team member18 minGetting started with the FFM API (final since Java 22): a first foreign call, confined, shared, automatic and global arenas, native and heap memory segments, reading and writing values, C strings and arrays, alignment and byte order, slices, copies, allocators, and memory-mapped files.
kvi5hnuCode Sprout team member15 minThe Java Native Interface: declaring native methods, generating headers with javac -h, JNI function naming and type mapping, strings and modified UTF-8, arrays, calling Java from C, exceptions, references, building and loading libraries, native access restrictions, and why the FFM API replaces JNI.
kvi5hnuCode Sprout team member16 minPrinting from Java: Printable and PrinterJob, print and page setup dialogs, PageFormat and Paper in points, banding and clipping, multipage output with Book and Pageable, print preview, javax.print services and document flavors, PostScript stream services, and printing attributes.
kvi5hnuCode Sprout team member17 minPixel images: reading and writing PNG, JPEG, GIF, BMP and TIFF with ImageIO, readers, writers, multi-image files and JPEG quality, the anatomy of BufferedImage with rasters and color models, pixel access, and filtering with convolution, lookup, rescale, color conversion and affine transforms.
kvi5hnuCode Sprout team member19 minThe Graphics2D pipeline settings in depth: BasicStroke widths, caps, joins, miter limits and dashes; color, gradient and texture paints; affine transforms and their order; clipping with shapes and text outlines; and alpha compositing with the twelve Porter-Duff rules.
kvi5hnuCode Sprout team member21 minHow Graphics2D renders: the stroke, transform, clip, fill and compose pipeline, rendering hints, the Shape hierarchy with Float and Double classes, rectangles, ellipses, arcs, curves, Path2D with winding rules, and combining shapes with Area.
kvi5hnuCode Sprout team member20 minShowing hierarchical data with JTree: DefaultMutableTreeNode and DefaultTreeModel, root handles and forests, tree paths and rows, editing through the model, node enumerations, selection events, cell renderers, and writing a lazy custom TreeModel.
kvi5hnuCode Sprout team member12 minHow JTable draws and edits its cells: default renderers by column class, custom renderers as rubber stamps, header renderers, the default text, check box and combo box editors, validating input, and writing your own cell editor with AbstractCellEditor.
kvi5hnuCode Sprout team member12 minDisplaying tabular data with JTable: simple tables, custom AbstractTableModel classes and their events, column classes, the column model, resizing, selection, view versus model indexes, and sorting and filtering rows with TableRowSorter and RowFilter.
kvi5hnuCode Sprout team member13 minAsking the user for input in Swing: ready-made JOptionPane message, confirm, option and input dialogs; custom JDialog classes with modality types, default buttons and data exchange; and file selection with JFileChooser, filters, views and accessories.
kvi5hnuCode Sprout team member14 minLaying out real forms in Swing: GridBagLayout cells, spans, weights, fill, anchor and padding, a helper class that tames the constraints, BoxLayout with glue and struts, and writing your own LayoutManager.
kvi5hnuCode Sprout team member13 minBuilding menu bars, submenus, check box and radio menu items and pop-up menus in Swing; keyboard mnemonics and platform-correct accelerators; enabling items at the right moment; and toolbars and tooltips that share Action objects with the menus.
kvi5hnuCode Sprout team member11 minLetting users choose instead of type: check boxes, radio buttons in button groups, borders and titled panels, generic combo boxes and their models, sliders with ticks and labels, plus spinners and lists.
kvi5hnuCode Sprout team member12 minCollecting text input in Swing: JTextField, labels and accessible labeling, JPasswordField with char arrays, JTextArea with wrapping, and scroll panes, plus document listeners, filters that restrict input, and undo.
kvi5hnuCode Sprout team member13 minHow Swing components are built and arranged: the model-view-controller design behind every component, button models and UI delegates, pluggable look and feel, and the three basic layout managers (flow, border and grid), combined with nested panels.
kvi5hnuCode Sprout team member12 minRemembering window positions, recent files and options with java.util.prefs: user and system trees, nodes named like packages, typed values with defaults, size limits, change listeners, XML export and import, the platform backing stores, and plugging in your own store with PreferencesFactory.
kvi5hnuCode Sprout team member10 minHandling the mouse in Swing: pressed, released and clicked events, click counts, drags, the wheel, buttons and modifiers, popup triggers and cursors, built into a small square editor; then the AWT event hierarchy, semantic versus low-level events, and the listener interfaces.
kvi5hnuCode Sprout team member11 min