Swing
Links
Netbeans - Mattise, ../netbeans/mattise
Improve Application Performance With SwingWorker in Java SE 6
Swing Explorer is a tool for Swing developers. It is intended for visual exploring of Swing-based application internals. It finds all windows in explored Swing application and displays their component hierarchies as a tree.
WJB-275A: Java programming Language Course, Building Java GUIs, WJB-275A: Java programming Language.
Components
Exit
private void buttonCancelActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
Layout
Look and Feel
public static void main(String args[]) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
UIManager.setLookAndFeel(
UIManager.getSystemLookAndFeelClassName());
...
main
Here is the correct way to instantiate your application’s UI:
public class MainFrame extends javax.swing.JFrame {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new MainFrame().setVisible(true);
}
});
}
}
Issues
javax.swing.text.rtf.RTFEditorKit
- UnsatisfiedLinkError
When using the RTFEditorKit on Debian Linux:
java.lang.UnsatisfiedLinkError:
/usr/local/bin/j2sdk1.4.2_16/jre/lib/i386/libawt.so: libXp.so.6:
cannot open shared object file: No such file or directory
To solve the issue (on Debian Linux):
apt-get install libxp6
apt-get install libxt6
apt-get install libxtst6