UIManager.getIcon("OptionPane.warningIcon") on Linux

Hi,
I'm using
Icon icon = UIManager.getIcon("OptionPane.warningIcon");to retrieve default icons and use them in my custom dialogs.
Everything is OK with JVMs since version 1.4.1 on every OSs (Windows 98, 2K and XP and Mac OS X 10.2 and later) except on Linux where icon is null!
If I use
JOptionPane.showMessageDialog(component, text, title, JOptionPane.WARNING_MESSAGE);the icon is displayed in the dialog even on Linux.
The same behaviour is encountered for the 4 icons (warningIcon, errorIcon, informationIcon and questionIcon).
How could I get the default icons on Linux?
Thanks in advance for your help.
Regards,
Lara.

henrique.abreu wrote:
Legend_Keeper wrote:
The above is probably the case, and whether it is or isn't the case, the String key you're using is probably not the right String key on the Linux platform you're using. I have no idea what the correct one is. Is there a way you can get the list of keys and print it out?Sure you can. The following code is not mine, I got it searching in this forum (a long time ago)
import java.util.Enumeration;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
public class ListProperties {
public static void main(String args[]) throws Exception {
UIManager.LookAndFeelInfo looks[] = UIManager.getInstalledLookAndFeels();
for (UIManager.LookAndFeelInfo info : looks) {
UIManager.setLookAndFeel(info.getClassName());
UIDefaults defaults = UIManager.getDefaults();
Enumeration newKeys = defaults.keys();
while (newKeys.hasMoreElements()) {
Object obj = newKeys.nextElement();
System.out.printf("%50s : %s\n", obj, UIManager.get(obj));
Well, I used something similiar to list all strings and found out there are listed on Linux too but I don't understand your syntax in for (UIManager.LookAndFeelInfo info : looks) nor does my Javac :javac ListProperties.java
ListProperties.java:10: ';' expected
    for (UIManager.LookAndFeelInfo info : looks) {
                                        ^
ListProperties.java:21: illegal start of expression
  ^
2 errorsThank you anyway for your answer...
Regards,
Lara.
Edited by: JolieLara on Oct 9, 2008 1:49 AM

Similar Messages

  • JOptionPane Icons

    Hello, all!
    JOptionPane icons are usually available by invoking
    UIManager.getIcon("OptionPane.errorIcon");
    UIManager.getIcon("OptionPane.informationIcon");
    UIManager.getIcon("OptionPane.questionIcon");
    UIManager.getIcon("OptionPane.warningIcon");This all works well, except for native GTK Look & Feel, where nulls are returned (all is ok with synthetic GTK Look & Feel). How can I fix the problem?

    You are using OK_OPTION when you should be using a message type:
    JOptionPane.showMessageDialog(MainFrame.getInstance(), message,
    windowTitle, JOptionPane.INFORMATION_MESSAGE);
    there are
    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE

  • Strange GUI freezing TrayIcon + PopupMenu, please help

    Can anybody help me ?
    I wrote very simple program demostrating some GUI activities (changing JPanel background color and tray icon). The problem is that my program freez when I popup tray icon menu (right click) ! :(
    I checked it on Windows XP and 2000 on Java 6.0 b105 and u1 b03.
    I also tryed popup menu manually via .show() from new thread, but it still blocks my program GUI.
    Can you just copy & paste this program, run it and tell me behaviour on your computer ???? Thank you very much.
    Maby somebody know what I am doing wrong and how to use PopupMenu without blocking other GUI operations ???
    //====================================
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class IsTrayIconMenuBlocking3
            public static void main( String[] args ) throws Exception
                    // --- JFrame & JPanel section
                    final JPanel jp = new JPanel();
                    JFrame jf = new JFrame();
                    jf.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
                    jf.add( jp );
                    jf.setSize( 300 , 300 );
                    jf.setVisible( true );
                    // --- menu item action
                    ActionListener itemExitAction = new ActionListener()
                            public void actionPerformed( ActionEvent e )
                                    System.out.println( "item action: exit" );
                                    System.exit( 0 );
                    // --- popup menu
                    PopupMenu pm = new PopupMenu( "Tray Menu" );
                    MenuItem mi = new MenuItem( "Exit" );
                    mi.addActionListener( itemExitAction);
                    pm.add( mi );
                    // --- system tray & tray icon
                    final TrayIcon ti = new
              TrayIcon( ((ImageIcon)UIManager.getIcon("OptionPane.questionIcon")).getImage() ,"Tray Icon" , pm );
                    SystemTray st = SystemTray.getSystemTray();
                    ti.setImageAutoSize( true );
                    st.add( ti );
                    // --- color & icon changing loop
                    final Image[] trayIcons = new Image[3];
                    trayIcons[0] = ((ImageIcon)UIManager.getIcon("OptionPane.errorIcon")).getImage();
                    trayIcons[1] = ((ImageIcon)UIManager.getIcon("OptionPane.warningIcon")).getImage();
                    trayIcons[2] = ((ImageIcon)UIManager.getIcon("OptionPane.informationIcon")).getImage();
                    Runnable colorChanger = new Runnable()
                            private int counter = 0;
                            private int icon_no = 0;
                            public void run()
                                    System.out.println( "Hello from EDT " + counter++ );
                                    if( jp.getBackground() == Color.RED )
                                            jp.setBackground( Color.BLUE );
                                    else
                                            jp.setBackground( Color.RED );
                                    ti.setImage( trayIcons[icon_no++] );
                                    if( icon_no == trayIcons.length ) icon_no = 0;
                    while( true )
                            javax.swing.SwingUtilities.invokeLater( colorChanger);
                            try{Thread.sleep( 500 );} catch ( Exception e ){}
    //==================================== Once again, thanks !!
    Artur Stanek, PL

    Yes. It happens to me too.
    I have tried using SwingWorker but nothing changes.
    It seems to me that PopupMenu blocks the EDT, try
    to put on you test frame a popup, probably when pop-up
    your gui stops to change colors.
    package test;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class IsTrayIconMenuBlocking3
       public static void main(String[] args) throws Exception
          final JPanel jp = new JPanel();
          JFrame jf = new JFrame();
          jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          jf.add(jp);
          jf.setSize(300, 300);
          jf.setVisible(true);
          WorkerTray vTray  = new WorkerTray();
          vTray.execute();
          ColorChanger vColor = new ColorChanger(jp, vTray.get());
          vColor.execute();
    package test;
    import java.awt.Color;
    import java.awt.Image;
    import java.awt.TrayIcon;
    import javax.swing.ImageIcon;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    import javax.swing.SwingWorker;
    import javax.swing.UIManager;
    public class ColorChanger extends SwingWorker<Boolean, Void>
       JPanel      jp;
       TrayIcon    ti;
       private int counter   = 0;
       private int icon_no   = 0;
       Image[]     trayIcons = new Image[3];
       public ColorChanger(JPanel aPanel, TrayIcon anIcon)
          jp = aPanel;
          ti = anIcon;
          trayIcons[0] = ((ImageIcon) UIManager.getIcon("OptionPane.errorIcon"))
                .getImage();
          trayIcons[1] = ((ImageIcon) UIManager
                .getIcon("OptionPane.warningIcon")).getImage();
          trayIcons[2] = ((ImageIcon) UIManager
                .getIcon("OptionPane.informationIcon")).getImage();
       @Override
       protected Boolean doInBackground() throws Exception
          boolean vCicle = true;
          while (vCicle)
             System.out.println("Hello from EDT " + counter++);
             if (jp.getBackground() == Color.RED)
                SwingUtilities.invokeLater(new Runnable()
                   public void run()
                      jp.setBackground(Color.BLUE);
             else
                SwingUtilities.invokeLater(new Runnable()
                   public void run()
                      jp.setBackground(Color.RED);
             ti.setImage(trayIcons[icon_no++]);
             if (icon_no == trayIcons.length)
                icon_no = 0;
             Thread.currentThread().sleep(500);
          return new Boolean(true);
    package test;
    import java.awt.MenuItem;
    import java.awt.PopupMenu;
    import java.awt.SystemTray;
    import java.awt.TrayIcon;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.ImageIcon;
    import javax.swing.SwingWorker;
    import javax.swing.UIManager;
    public class WorkerTray extends SwingWorker<TrayIcon, Void>
       TrayIcon wTray;
       public WorkerTray()
       @Override
       protected TrayIcon doInBackground() throws Exception
          PopupMenu pm = new PopupMenu("Tray Menu");
          MenuItem mi = new MenuItem("Exit");
          // mi.addActionListener(itemExitAction);
          pm.add(mi);
          // --- system tray & tray icon
          wTray = new TrayIcon(((ImageIcon) UIManager
                .getIcon("OptionPane.questionIcon")).getImage(), "Tray Icon", pm);
          mi.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent aE)
                      System.out.println("quiquiquiquqi");
                      System.exit(0);
          SystemTray st = SystemTray.getSystemTray();
          wTray.setImageAutoSize(true);
          st.add(wTray);
          return wTray;
    }

  • How to customize the title bar on my own Look And Feel?

    Hi all!
    I am creating my own Look and Feel which extends from NimbusLookAndFeel. What I'm doing is overwriting UIDefaults values??, referring to the Painters. For example:
    +uiDefault.put ("Button [Enabled]", new ButtonEnabledPainter());+
    But now I need is to customize the title bar of the JFrame's, but I do not see this option in Painter's values ??can be overwritten by Nimbus (http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults . html).
    You know as possible? I have to overwrite an existing UI component? The idea is I want to make the look and feel like SeaGlass, but the code seems a bit complex to know where to begin.
    I hope you can guide me on this issue.
    Thank you very much for everything! And excuse my English!.
    Greetings!

    very simple example, with direct methods
    import java.awt.*;
    import java.awt.event.*;
    import java.util.LinkedList;
    import java.util.Queue;
    import javax.swing.*;
    public class NimbusBorderPainterDemo extends JFrame {
        private static final long serialVersionUID = 1L;
        private JFrame frame = new JFrame();
        private JPanel fatherPanel = new JPanel();
        private JPanel contentPanel = new JPanel();
        private GradientPanel titlePanel = new GradientPanel(Color.BLACK);
        private JLabel buttonPanel = new JLabel();
        private Queue<Icon> iconQueue = new LinkedList<Icon>();
        public NimbusBorderPainterDemo() {
            iconQueue.add(UIManager.getIcon("OptionPane.errorIcon"));
            iconQueue.add(UIManager.getIcon("OptionPane.informationIcon"));
            iconQueue.add(UIManager.getIcon("OptionPane.warningIcon"));
            iconQueue.add(UIManager.getIcon("OptionPane.questionIcon"));
            JButton button0 = createButton();
            button0.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    frame.setExtendedState(ICONIFIED);
            JButton button1 = createButton();
            button1.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    frame.setExtendedState(MAXIMIZED_BOTH | NORMAL);
                }//quick implemented, not correct you have to override both methods
            JButton button2 = createButton();
            button2.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    int confirm = JOptionPane.showOptionDialog(frame,
                            "Are You Sure to Close Application?", "Exit Confirmation",
                            JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,
                            null, null, null);
                    if (confirm == JOptionPane.YES_OPTION) {
                        System.exit(1);
            buttonPanel.setLayout(new GridLayout(0, 3, 5, 0));
            buttonPanel.setPreferredSize(new Dimension(160, 30));
            buttonPanel.add(button0);// JLabel is best and cross_platform JComponents
            buttonPanel.add(button1);// not possible put there witouth set Dimmnesion
            buttonPanel.add(button2);// and LayoutManager, work in all cases better
            titlePanel.setLayout(new BorderLayout());//than JPanel or JCompoenent
            titlePanel.add(new JLabel(nextIcon()), BorderLayout.WEST);
            titlePanel.add(new JLabel("My Frame"), BorderLayout.CENTER);
            titlePanel.setBorder(BorderFactory.createLineBorder(Color.GRAY));
            titlePanel.add(buttonPanel, BorderLayout.EAST);
            JTextField field = new JTextField(50);
            JButton btn = new JButton("Close Me");
            btn.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    System.exit(1);
            contentPanel.add(field);
            contentPanel.add(btn);
            fatherPanel.setLayout(new BorderLayout());
            fatherPanel.add(titlePanel, BorderLayout.NORTH);
            fatherPanel.add(contentPanel, BorderLayout.CENTER);
            frame.setUndecorated(true);
            frame.add(fatherPanel);
            frame.setLocation(50, 50);
            frame.pack();
            frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
            frame.setVisible(true);
            ComponentMover cm = new ComponentMover(frame, titlePanel);
            //by camickr http://tips4java.wordpress.com/2009/06/14/moving-windows/
        private JButton createButton() {
            JButton button = new JButton();
            button.setBorderPainted(false);
            button.setBorder(null);
            button.setFocusable(false);
            button.setMargin(new Insets(0, 0, 0, 0));
            button.setContentAreaFilled(false);
            button.setIcon(nextIcon());
            button.setRolloverIcon(nextIcon());
            button.setPressedIcon(nextIcon());
            button.setDisabledIcon(nextIcon());
            nextIcon();
            return button;
        private Icon nextIcon() {
            Icon icon = iconQueue.peek();
            iconQueue.add(iconQueue.remove());
            return icon;
        private class GradientPanel extends JPanel {
            private static final long serialVersionUID = 1L;
            public GradientPanel(Color background) {
                setBackground(background);
            @Override
            public void paintComponent(Graphics g) {
                super.paintComponent(g);
                if (isOpaque()) {
                    Color background = new Color(168, 210, 241);
                    Color controlColor = new Color(230, 240, 230);
                    int width = getWidth();
                    int height = getHeight();
                    Graphics2D g2 = (Graphics2D) g;
                    Paint oldPaint = g2.getPaint();
                    g2.setPaint(new GradientPaint(0, 0, background, width, 0, controlColor));
                    g2.fillRect(0, 0, width, height);
                    g2.setPaint(oldPaint);
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
                    try {
                        UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
                    } catch (Exception fail) {
                    UIManager.getLookAndFeelDefaults().put("nimbusFocus", Color.RED);
                    NimbusBorderPainterDemo nimbusBorderPainterDemo = new NimbusBorderPainterDemo();
    }

  • Official way to reuse icons from JOptionPane

    I want to use some of the icons that JOptionPane uses in one of my own dialogs. Is there a safe and official way of doing this? I am pretty new to Java and JFC so I could be missing something obvious. I did a search in this forum and found lots of discussion on how to use your own icons instead of the ones JOptionPane provides.
    I know I can poke around the library .jar files and find the images and then use code like this:
    URL imageURL = loadFromClassLocation.getResource (iconFileName);to load the image but my instincts say that is too fragile. Is there an official way to do this? Perhaps a property defined in the look and feel?
    thanks,
    Ian

    UIManager.getIcon("OptionPane.errorIcon")
    UIManager.getIcon("OptionPane.informationIcon")
    UIManager.getIcon("OptionPane.warningIcon")
    UIManager.getIcon("OptionPane.questionIcon")
    The easiest way to find things like this is to look at the source code for the component class and for the component class's ui. Eventually, the resources will be pulled through the ui manager and you can get the key strings. I found these strings in BasicOptionPaneUI::getIconForType.

  • JOptionPane getting it's icon

    I have created a JOptionPane and I am trying to get it's icon. I read that the icon was driven by the message type so why is the icon null? Better yet, how can I get get the error icon that it uses. That's my goal. This is what I have done
    String message = "msg";
    JOptionPane pane = new JOptionPane(message, JOptionPane.ERROR_MESSAGE);
    JDialog dlg = pane.createDialog(null, "title");
    Icon icon = pane.getIcon();
    //the Icon is null  BOOOO 
    //if I add do this then the icon shows up... uhm... icon is bound in the show.  How is does show get it?
    dlg.show();

    you can use :
    UIManager.getIcon("OptionPane.questionIcon")
    UIManager.getIcon("OptionPane.errorIcon")
    UIManager.getIcon("OptionPane.informationIcon")
    UIManager.getIcon("OptionPane.warningIcon")

  • Custom TrustManager example which asks user for trustability

    Hi!
    For I needed a trustmanager which shows an untrusted server certificate to the user and asks him if the certificate can be considered trustable I wrote an own trustmanager. As it took much time to find out how to do this here is my code to shorten your time if you need a similar functionality:
    NOTE:
    If a certificate is declared trustable by the user it is stored in a local keystore file. So if you use the code in an applet you need to sign it to get the appropriate permissions.
    To use it you have to put the following code where you get your SSLSocketFactory:
    try{
                   SSLContext sslContext=SSLContext.getInstance("SSL","SunJSSE");
                   TrustManager[] tm={new StoreCertTrustManager()};
                   sslContext.init(null,tm,null);
                   factory = ( SSLSocketFactory) sslContext.getSocketFactory();
    }catch(Exception e) { ... }
    Here is the implementation of the StoreCertTrustManager:
    * This class implements a TrustManager for authenticating the servers certificate.
    * It enhances the default behaviour.
    class StoreCertTrustManager implements X509TrustManager {
         /** The trustmanager instance used to delegate to default behaviour.*/
         private TrustManager tm=null;
         /** Password for own keystore */
         private final char[] keyStorePassword=new String("changeit").toCharArray();
         /** Path to own keystore. Store it into the home directory to avoid permission problems.*/
         private final String keyStorePath=System.getProperty("user.home")+"/https-keystore";
         /** The stream for reading from the keystore. */
         FileInputStream keyStoreIStream=null;
         /** The instance of the keystore */
         private KeyStore keyStore=null;
         * Creates a TrustManager which first checks the default behaviour of the X509TrustManager.
         * If the default behaviour throws a CertificateException ask the user if the certificate
         * should be declared trustable.
         * @throws Exception: If SSL - initialization failed.
         StoreCertTrustManager() throws Exception {
              /* Try to set the truststore system property to our keystore
              * if we have the appropriate permissions.*/
              try{
                   File httpsKeyStore=new File(keyStorePath);
                   if(httpsKeyStore.exists()==true) {
                        System.setProperty("javax.net.ssl.trustStore",keyStorePath);
              }catch(SecurityException se) {}
              /* Create the TrustManagerFactory. We use the SunJSSE provider
              * for this purpose.*/
              TrustManagerFactory tmf=TrustManagerFactory.getInstance("SunX509", "SunJSSE");
              tmf.init((java.security.KeyStore)null);
              tm=tmf.getTrustManagers()[0];
              /* Something failed we could not get a TrustManager instance.*/
              if(tm == null) {
                   throw new SSLException("Could not get default TrustManager instance.");
              /* Create the file input stream for the own keystore. */
              try{
                   keyStoreIStream = new FileInputStream(keyStorePath);
              } catch( FileNotFoundException fne ) {
                   // If the path does not exist then a null stream means
                   // the keystore is initialized empty. If an untrusted
                   // certificate chain is trusted by the user, then it will be
                   // saved in the file pointed to by keyStorePath.
                   keyStoreIStream = null;
              /* Now create the keystore. */
              try{
                   keyStore=KeyStore.getInstance(KeyStore.getDefaultType());
                   keyStore.load(keyStoreIStream,keyStorePassword);
              }catch(KeyStoreException ke) {
                   System.out.println("Loading of https keystore from file <"+keyStorePath+"> failed. error message: "+ke.getMessage());
                   keyStore=null;
         * Authenticates a client certificate. For we don't need that case only implement the
         * default behaviour.
         * @param chain In: The certificate chain to be authenticated.
         * @param authType In: The key exchange algorithm.
         public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
              ((X509TrustManager)tm).checkClientTrusted(chain,authType);
         * Authenticates a server certificate. If the given certificate is untrusted ask the
         * user whether to proceed or not.
         * @param chain In: The certificate chain to be authenticated.
         * @param authType In: The key exchange algorithm.
         public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
              /* Output the certifcate chain for debugging purposes */
              System.out.println("got X509 certificate from server:");
              for(int i=0; i<chain.length; i++) {
                   System.out.println("chain["+i+"]: "+chain.getIssuerDN().getName());
              try{
                   /* First try the default behaviour. */
                   ((X509TrustManager)tm).checkServerTrusted(chain,authType);
              }catch(CertificateException ce) {
                   System.out.println("in checkServerTrusted: authType: "+authType+", got certificate exception: "+ce.getMessage());
                   /* If we got here the certificate is untrusted. */
                   /* If we could not craete a keystore instance forward the certificate exception. So we have
                   * at least the default behaviour. */
                   if(keyStore==null || chain == null || chain.length==0) {
                        throw(ce);
                   try{
                        /* If we could not find the certificate in the keystore
                        * ask the user if it should be treated trustable. */
                        AskForTrustability ask=new AskForTrustability (chain);
                        boolean trustCert=ask.showCertificateAndGetDecision();
                        if(trustCert==true) {
                             // Add Chain to the keyStore.
                             for (int i = 0; i < chain.length; i++)
                                  keyStore.setCertificateEntry
                                       (chain[i].getIssuerDN().toString(), chain[i]);
                             // Save keystore to file.
                             FileOutputStream keyStoreOStream =
                                  new FileOutputStream(keyStorePath);
                             keyStore.store(keyStoreOStream, keyStorePassword);
                             keyStoreOStream.close();
                             keyStoreOStream = null;
                             System.out.println("Keystore saved in " + keyStorePath);
                        } else {
                             throw(ce);
                   }catch(Exception ge) {
                        /* Got an unexpected exception so throw the original exception. */
                        System.out.println("in checkServerTrusted: got exception type: "+ge.getClass()+" message: "+ge.getMessage());
                        throw ce;
         * Merges the system wide accepted issuers and the own ones and
         * returns them.
         * @return: Array of X509 certificates of the accepted issuers.
    public X509Certificate[] getAcceptedIssuers() {
              X509Certificate[] cf=((X509TrustManager)tm).getAcceptedIssuers();
              X509Certificate[] allCfs=cf;
              if(keyStore != null) {
                   try{
                        Enumeration ownCerts=keyStore.aliases();
                        Vector certsVect=new Vector();
                        while(ownCerts.hasMoreElements()) {
                             Object cert=ownCerts.nextElement();
                             certsVect.add(keyStore.getCertificate(cert.toString()));
                        int newLength=cf.length+certsVect.size();
                        allCfs=new X509Certificate[newLength];
                        Iterator it=certsVect.iterator();
                        for(int i=0; i<newLength ; i++) {
                             if(i<cf.length) {
                                  allCfs[i]=cf[i];
                             } else {
                                  allCfs[i]=(X509Certificate)it.next();
                   }catch(KeyStoreException e) {}
              for(int i=0; i<allCfs.length;i++) {
                   System.out.println("allCfs["+i+"]: "+allCfs[i].getIssuerDN());
              return allCfs;
         * This class implements an interactive dialog. It shows the contents of a
         * certificate and asks the user if it is trustable or not.
         class AskForTrustability implements ActionListener, ListSelectionListener {
              private JButton yes=new JButton("Yes"),no=new JButton("No");
              /** default to not trustable */
              private boolean isTrusted=false;
              private JDialog trust=null;
              private JList certItems=null;
              private JTextArea certValues=null;
              private JComboBox certChain=null;
              private final String certParms[]={"Version","Serial Number","Signature Algorithm", "Issuer", "Validity Period", "Subject", "Signature","Certificate Fingerprint"};
              private X509Certificate[] chain;
              private int chainIdx=0;
              * Creates an instance of the class and stores the certificate to show internally.
              * @param chain In: The certificate chain to show.
              AskForTrustability (X509Certificate[] chain) {
                   this.chain=chain;
              * This method shows a dialog with all interesting information of the certificate and
              * asks the user if the certificate is trustable or not. This method block

    Your code has some errors, I have correct it. Here is the new code:
    StoreCertTrustManager.java
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.security.*;
    import java.security.cert.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.net.ssl.*;
    * This class implements a TrustManager for authenticating the servers certificate.
    * It enhances the default behaviour.
    class StoreCertTrustManager implements X509TrustManager {
         /** The trustmanager instance used to delegate to default behaviour.*/
         private TrustManager tm=null;
         /** Password for own keystore */
         private final char[] keyStorePassword=new String("changeit").toCharArray();
         /** Path to own keystore. Store it into the home directory to avoid permission problems.*/
         private final String keyStorePath=System.getProperty("user.home")+"/https-keystore";
         /** The stream for reading from the keystore. */
         FileInputStream keyStoreIStream=null;
         /** The instance of the keystore */
         private KeyStore keyStore=null;
          * Creates a TrustManager which first checks the default behaviour of the X509TrustManager.
          * If the default behaviour throws a CertificateException ask the user if the certificate
          * should be declared trustable.
          * @throws Exception: If SSL - initialization failed.
         StoreCertTrustManager() throws Exception {
              /* Try to set the truststore system property to our keystore
               * if we have the appropriate permissions.*/
              try{
                   File httpsKeyStore=new File(keyStorePath);
                   if(httpsKeyStore.exists()==true) {
                        System.setProperty("javax.net.ssl.trustStore",keyStorePath);
              }catch(SecurityException se) {}
              /* Create the TrustManagerFactory. We use the SunJSSE provider
               * for this purpose.*/
              TrustManagerFactory tmf=TrustManagerFactory.getInstance("SunX509", "SunJSSE");
              tmf.init((java.security.KeyStore)null);
              tm=tmf.getTrustManagers()[0];
              /* Something failed we could not get a TrustManager instance.*/
              if(tm == null) {
                   throw new SSLException("Could not get default TrustManager instance.");
              /* Create the file input stream for the own keystore. */
              try{
                   keyStoreIStream = new FileInputStream(keyStorePath);
              } catch( FileNotFoundException fne ) {
              // If the path does not exist then a null stream means
              // the keystore is initialized empty. If an untrusted
              // certificate chain is trusted by the user, then it will be
              // saved in the file pointed to by keyStorePath.
                   keyStoreIStream = null;
              /* Now create the keystore. */
              try{
                   keyStore=KeyStore.getInstance(KeyStore.getDefaultType());
                   keyStore.load(keyStoreIStream,keyStorePassword);
              }catch(KeyStoreException ke) {
                   System.out.println("Loading of https keystore from file <"+keyStorePath+"> failed. error message: "+ke.getMessage());
                   keyStore=null;
          * Authenticates a client certificate. For we don't need that case only implement the
          * default behaviour.
          * @param chain In: The certificate chain to be authenticated.
          * @param authType In: The key exchange algorithm.
         public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
              ((X509TrustManager)tm).checkClientTrusted(chain,authType);
          * Authenticates a server certificate. If the given certificate is untrusted ask the
          * user whether to proceed or not.
          * @param chain In: The certificate chain to be authenticated.
          * @param authType In: The key exchange algorithm.
         public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
         /* Output the certifcate chain for debugging purposes */
              System.out.println("got X509 certificate from server:");
              for(int i=0; i<chain.length; i++) {
                   System.out.println("chain["+i+"]: "+chain.getIssuerDN().getName());
              try{
              /* First try the default behaviour. */
                   ((X509TrustManager)tm).checkServerTrusted(chain,authType);
              }catch(CertificateException ce) {
                   System.out.println("in checkServerTrusted: authType: "+authType+", got certificate exception: "+ce.getMessage());
                   /* If we got here the certificate is untrusted. */
                   /* If we could not craete a keystore instance forward the certificate exception. So we have
                   * at least the default behaviour. */
                   if(keyStore==null || chain == null || chain.length==0) {
                        throw(ce);
                   try{
                   /* If we could not find the certificate in the keystore
                   * ask the user if it should be treated trustable. */
                        AskForTrustability ask=new AskForTrustability (chain);
                        boolean trustCert=ask.showCertificateAndGetDecision();
                        if(trustCert==true) {
                             // Add Chain to the keyStore.
                             for (int i = 0; i < chain.length; i++){
                                  keyStore.setCertificateEntry(chain[i].getIssuerDN().toString(), chain[i]);
                             // Save keystore to file.
                             FileOutputStream keyStoreOStream = new FileOutputStream(keyStorePath);
                             keyStore.store(keyStoreOStream, keyStorePassword);
                             keyStoreOStream.close();
                             keyStoreOStream = null;
                             System.out.println("Keystore saved in " + keyStorePath);
                        } else {
                             throw(ce);
                   }catch(Exception ge) {
                   /* Got an unexpected exception so throw the original exception. */
                        System.out.println("in checkServerTrusted: got exception type: "+ge.getClass()+" message: "+ge.getMessage());
                        throw ce;
         * Merges the system wide accepted issuers and the own ones and
         * returns them.
         * @return: Array of X509 certificates of the accepted issuers.
         public java.security.cert.X509Certificate[] getAcceptedIssuers() {
              X509Certificate[] cf=((X509TrustManager)tm).getAcceptedIssuers();
              X509Certificate[] allCfs=cf;
              if(keyStore != null) {
                   try{
                        Enumeration ownCerts=keyStore.aliases();
                        Vector certsVect=new Vector();
                        while(ownCerts.hasMoreElements()) {
                             Object cert=ownCerts.nextElement();
                             certsVect.add(keyStore.getCertificate(cert.toString()));
                        int newLength=cf.length+certsVect.size();
                        allCfs=new X509Certificate[newLength];
                        Iterator it=certsVect.iterator();
                        for(int i=0; i<newLength ; i++) {
                             if(i<cf.length){
                                  allCfs=cf;
                             else {
                                  allCfs=(X509Certificate[])it.next();
                   }catch(KeyStoreException e) {}
              for(int i=0; i<allCfs.length;i++) {
                   System.out.println("allCfs["+i+"]: "+allCfs[i].getIssuerDN());
              return allCfs;
         * This class implements an interactive dialog. It shows the contents of a
         * certificate and asks the user if it is trustable or not.
         class AskForTrustability implements ActionListener, ListSelectionListener {
              private JButton yes=new JButton("Yes"),no=new JButton("No");
              /** default to not trustable */
              private boolean isTrusted=false;
              private JDialog trust=null;
              private JList certItems=null;
              private JTextArea certValues=null;
              private JComboBox certChain=null;
              private final String certParms[]={"Version","Serial Number","Signature Algorithm", "Issuer", "Validity Period", "Subject", "Signature","Certificate Fingerprint"};
              private X509Certificate[] chain;
              private int chainIdx=0;
         * Creates an instance of the class and stores the certificate to show internally.
         * @param chain In: The certificate chain to show.
              AskForTrustability (X509Certificate[] chain) {
                   this.chain=chain;
         * This method shows a dialog with all interesting information of the certificate and
         * asks the user if the certificate is trustable or not. This method blocks until
         * the user presses the 'Yes' or 'No' button.
         * @return: true: The certificate chain is trustable
         * false: The certificate chain is not trustable
              public boolean showCertificateAndGetDecision() {
                   if(chain == null || chain.length == 0) {
                        return false;
                   trust=new JDialog((Frame)null,"Untrusted server certificate for SSL connection",true);
                   Container cont=trust.getContentPane();
                   GridBagLayout gl=new GridBagLayout();
                   cont.setLayout(gl);
                   JPanel pLabel=new JPanel(new BorderLayout());
                   Icon icon = UIManager.getIcon("OptionPane.warningIcon");
                   pLabel.add(new JLabel(icon),BorderLayout.WEST);
                   JTextArea label=new JTextArea("The certificate sent by the server is unknown and not trustable!\n"+
                   "Do you want to continue creating a SSL connection to that server ?\n\n"+
                   "Note: If you answer 'Yes' the certificate will be stored in the file\n\n"+
                   keyStorePath+"\n\n"+
                   "and the next time treated trustable automatically. If you want to remove\n"+
                   "the certificate delete the file or use keytool to remove certificates\n"+
                   "selectively.");
                   label.setEditable(false);
                   label.setBackground(cont.getBackground());
                   label.setFont(label.getFont().deriveFont(Font.BOLD));
                   pLabel.add(label,BorderLayout.EAST);
                   GridBagConstraints gc=new GridBagConstraints();
                   gc.fill=GridBagConstraints.HORIZONTAL;
                   gl.setConstraints(pLabel,gc);
                   pLabel.setBorder(new EmptyBorder(4,4,4,4));
                   cont.add(pLabel);
                   Vector choices=new Vector();
                   for(int i=0; i<chain.length ; i++) {
                        choices.add((i+1)+". certificate of chain");
                   certChain = new JComboBox(choices);
                   certChain.setBackground(cont.getBackground());
                   certChain.setFont(label.getFont().deriveFont(Font.BOLD));
                   certChain.addActionListener(this);
                   JPanel pChoice=new JPanel(new BorderLayout());
                   pChoice.add(certChain);
                   gc=new GridBagConstraints();
                   gc.fill=GridBagConstraints.HORIZONTAL;
                   gc.insets=new Insets(4,4,4,4);
                   gc.gridy=1;
                   gl.setConstraints(pChoice,gc);
                   pChoice.setBorder(new TitledBorder(new EmptyBorder(0,0,0,0), "Certificate chain"));
                   cont.add(pChoice);
                   certItems=new JList(certParms);
                   certItems.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
                   certItems.addListSelectionListener(this);
                   JPanel pList=new JPanel(new BorderLayout());
                   pList.add(certItems);
                   pList.setBorder(new TitledBorder(new EtchedBorder(), "Certificate variables"));
                   gc=new GridBagConstraints();
                   gc.fill=GridBagConstraints.HORIZONTAL;
                   gc.insets=new Insets(4,4,4,4);
                   gc.gridy=2;
                   gl.setConstraints(pList,gc);
                   cont.add(pList);
                   certValues=new JTextArea();
                   certValues.setFont(label.getFont().deriveFont(Font.BOLD));
                   certValues.setEditable(false);
                   certValues.setBackground(cont.getBackground());
                   certValues.setLineWrap(true);
                   certValues.setWrapStyleWord(true);
                   JPanel pVals=new JPanel(new BorderLayout());
                   pVals.add(certValues);
                   pVals.setBorder(new TitledBorder(new EtchedBorder(), "Variable value"));
                   gc=new GridBagConstraints();
                   gc.insets=new Insets(4,4,4,4);
                   gc.weightx=1.0;
                   gc.weighty=1.0;
                   gc.fill=GridBagConstraints.BOTH;
                   gc.gridy=3;
                   gl.setConstraints(pVals,gc);
                   cont.add(pVals);
                   JPanel p=new JPanel();
                   yes.addActionListener(this);
                   no.addActionListener(this);
                   p.add(yes);
                   p.add(no);
                   gc=new GridBagConstraints();
                   gc.weightx=1.0;
                   gc.fill=GridBagConstraints.HORIZONTAL;
                   gc.gridy=4;
                   gl.setConstraints(p,gc);
                   cont.add(p);
                   //This should be the subject item
                   certItems.setSelectedIndex(5);
                   certItems.requestFocus();
                   trust.pack();
                   trust.setSize(500,600);
                   trust.setVisible(true);
                   return isTrusted;
         * Listener method for changin the contents of the JTextArea according to the
         * selected list item.
              public void valueChanged(ListSelectionEvent e) {
                   if (e.getValueIsAdjusting()){
                        return;
                   JList theList = (JList)e.getSource();
                   if (theList.isSelectionEmpty()) {
                        certValues.setText("");
                   } else {
                        String selVal = theList.getSelectedValue().toString();
                        if(selVal.equals("Version")==true) {
                             certValues.setText(String.valueOf(chain[chainIdx].getVersion()));
                        } else if(selVal.equals("Serial Number")==true) {
                             certValues.setText(byteArrayToHex(chain[chainIdx].getSerialNumber().toByteArray()));
                        } else if(selVal.equals("Signature Algorithm")==true) {
                             certValues.setText(chain[chainIdx].getSigAlgName());
                        } else if(selVal.equals("Issuer")==true) {
                             certValues.setText(chain[chainIdx].getIssuerDN().getName());
                        } else if(selVal.equals("Validity Period")==true) {
                             certValues.setText(chain[chainIdx].getNotBefore().toString()+" - "+chain[chainIdx].getNotAfter().toString());
                        } else if(selVal.equals("Subject")==true) {
                             certValues.setText(chain[chainIdx].getSubjectDN().getName());
                        } else if(selVal.equals("Signature")==true) {
                             certValues.setText(byteArrayToHex(chain[chainIdx].getSignature()));
                        } else if(selVal.equals("Certificate Fingerprint")==true) {
                             try{
                                  certValues.setText(getFingerprint(chain[chainIdx].getEncoded(),"MD5")+"\n"+
                                  getFingerprint(chain[chainIdx].getEncoded(),"SHA1"));
                             }catch(Exception fingerE) {
                                  certValues.setText("Couldn't calculate fingerprints of the certificate.\nReason: "+fingerE.getMessage());
         * This method calculates the fingerprint of the certificate. It takes the encoded form of
         * the certificate and calculates a hash value from it.
         * @param certificateBytes In: The byte array of the encoded data.
         * @param algorithm In: The algorithm to be used for calculating the hash value.
         * Two are possible: MD5 and SHA1
         * @return: Returns a hex formated string of the fingerprint.
              private String getFingerprint(byte[] certificateBytes, String algorithm) throws Exception {
                   MessageDigest md = MessageDigest.getInstance(algorithm);
                   md.update(certificateBytes);
                   byte[] digest = md.digest();
                   return new String(algorithm+": "+byteArrayToHex(digest));
         * This method converts a byte array to a hex formatted string.
         * @param byteData In: The data to be converted.
         * @return: The formatted string.
              private String byteArrayToHex(byte[] byteData) {
                   StringBuffer sb=new StringBuffer();
                   for (int i = 0; i < byteData.length; i++) {
                        if (i != 0) sb.append(":");
                        int b = byteData[i] & 0xff;
                        String hex = Integer.toHexString(b);
                        if (hex.length() == 1) sb.append("0");
                        sb.append(hex);
                   return sb.toString();
         * The listener for the 'Yes', 'No' buttons.
              public void actionPerformed(ActionEvent e) {
                   Object entry =e.getSource();
                   if(entry.equals(yes)==true) {
                        isTrusted=true;
                        trust.dispose();
                        } else if(entry.equals(certChain)==true) {
                             int selIndex=certChain.getSelectedIndex();
                             if(selIndex >=0 && selIndex < chain.length) {
                                  chainIdx=selIndex;
                                  int oldSelIdx=certItems.getSelectedIndex();
                                  certItems.clearSelection();
                                  certItems.setSelectedIndex(oldSelIdx);
                        } else {
                             trust.dispose();
    -----------------------------------------------end------------------------------------------------
    We can use follow code in main class to complete SSL authorize:
             SSLSocketFactory factory = null;
              KeyManager[] km = null;
              TrustManager[] tm = {new StoreCertTrustManager()};
              SSLContext sslContext = SSLContext.getInstance("SSL","SunJSSE");
              sslContext.init(null, tm, new java.security.SecureRandom());
              factory = sslContext.getSocketFactory();
             SSLSocket socket =
              (SSLSocket)factory.createSocket("localhost", 7002);

  • TrayIcon with PopupMenu or JPopupMenu ?

    Hi. (Sorry for my english.)
    I spent last 10 whole days digging menu things in TrayIcon with no success :((.
    I have three questions.
    I can make JPopupWindow above MS-Windows task bar ( SwingUtilities.windowForComponent( JPupupMenu ).window.setAlwaysOnTop( true ) ) , but how to get keyboard focus/input ????
    Looking back to normal PopupMenu ... when it pop up -> it blocks Event Dispatch Thread (EDT) (even if I fire it manually .show() from new Thread , I also tryed install new EventQueue ).
    How to make non-blocking PopupMenu ? How to pop up via .show() without "origin" ? ( MouseEvent of TrayIcon returns null in .getComponent() ).
    I am using Java 6.0 b105 and u1 b03 at WinXP.
    Does anybody know solutions ?
    Thanks !
    PS: I wrote a very simple example.
    It changes tray icon and JPanel background every 0.5 second. The question is : is program continue to work when you popup tray icon menu (right click) ?
    This is the last event that goes thru EventQueue after I right click tray icon, and before menu shows (and blocks everythig): java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=sun.awt.windows.WTrayIconPeer$1@128e20a,notifier=null,catchExceptions=false,when=1172501444578] on sun.awt.windows.WToolkit@1e0cf70
    //====================================
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class IsTrayIconMenuBlocking3
         public static void main( String[] args ) throws Exception
              // --- JFrame & JPanel section
              final JPanel jp = new JPanel();
              JFrame jf = new JFrame();
              jf.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              jf.add( jp );
              jf.setSize( 300 , 300 );
              jf.setVisible( true );
              // --- menu item action
              ActionListener itemExitAction = new ActionListener()
                   public void actionPerformed( ActionEvent e )
                        System.out.println( "item action: exit" );
                        System.exit( 0 );
              // --- popup menu
              PopupMenu pm = new PopupMenu( "Tray Menu" );
              MenuItem mi = new MenuItem( "Exit" );
              mi.addActionListener( itemExitAction);
              pm.add( mi );
              // --- system tray & tray icon
              final TrayIcon ti = new TrayIcon( ((ImageIcon)UIManager.getIcon("OptionPane.questionIcon")).getImage() , "Tray Icon" , pm );
              SystemTray st = SystemTray.getSystemTray();
              ti.setImageAutoSize( true );
              st.add( ti );          
              // --- color & icon changing loop
              final Image[] trayIcons = new Image[3];
              trayIcons[0] = ((ImageIcon)UIManager.getIcon("OptionPane.errorIcon")).getImage();
              trayIcons[1] = ((ImageIcon)UIManager.getIcon("OptionPane.warningIcon")).getImage();
              trayIcons[2] = ((ImageIcon)UIManager.getIcon("OptionPane.informationIcon")).getImage();
              Runnable colorChanger = new Runnable()
                   private int counter = 0;
                   private int icon_no = 0;
                   public void run()
                        System.out.println( "Hello from EDT " + counter++ );
                        if( jp.getBackground() == Color.RED )
                             jp.setBackground( Color.BLUE );
                        else
                             jp.setBackground( Color.RED );
                        ti.setImage( trayIcons[icon_no++] );
                        if( icon_no == trayIcons.length ) icon_no = 0;                    
              while( true )
                   javax.swing.SwingUtilities.invokeLater( colorChanger);
                   try{Thread.sleep( 500 );} catch ( Exception e ){}
    //====================================

    Hi,
    thanks for help.
    I am closing this subject.
    My solution can be found at http://forums.java.net/jive/thread.jspa?threadID=23466&tstart=0 .
    ( java.net Forums � Java Desktop Technologies � Swing & AWT � TrayIcon PopupMenu or JPopupMenu ? )
    Bye !

  • How to set font for  JOptionPane.showMessageDialog() ?

    Hi,
    I want to set font for JOptionPane.showMessageDialog(). I have tried with following but it did not worked.
    javax.swing.UIManager.put("JOptionPane.font", "Verdana"); Do any one have idea how to do this. Your suggestion would be helpfull to me.
    Thank you.

    Then you'll have to loop over the components in the JOptionPane and setFont for each JButton. My SwingUtils class (search the net using Darryl SwingUtils, I can't give you a link as it's blocked from my office) can make this easier.
    Sample code:import darrylbu.util.SwingUtils;
    import java.awt.Font;
    import javax.swing.*;
    import javax.swing.plaf.FontUIResource;
    public class OptionPaneFonts {
       public static void main(String[] args) {
          UIManager.put("OptionPane.messageFont", new FontUIResource(new Font(
                  "Verdana", Font.BOLD, 32)));
          SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
                new OptionPaneFonts().makeUI();
       public void makeUI() {
          JOptionPane pane = new JOptionPane("So it's a date?",
                  JOptionPane.QUESTION_MESSAGE,
                  JOptionPane.YES_NO_CANCEL_OPTION,
                  UIManager.getIcon("OptionPane.questionIcon"),
                  new String[]{"Okey-dokey", "Not on your life!",
                     "Let me think about it"
                  }, null);
          for (JButton button : SwingUtils.getDescendantsOfType(JButton.class, pane)) {
             button.setFont(new Font("Tahoma", Font.ITALIC, 18));
          JDialog dialog = new JDialog((JWindow) null);
          dialog.setModal(true);
          dialog.add(pane);
          dialog.pack();
          dialog.setLocationRelativeTo(null);
          dialog.setVisible(true);
    }db
    Edited by: DarrylBurke -- shortened the code

  • Help debugging JVM crash on linux

    Does anybody have any tips on debugging JVM crashes?
    I have a third-party shared library that I link in and use through JNI bindings.
    When I use this third party application with the 1.6.0 JVM on red hat enterprise linux, it causes the JVM to unpredictably SEGV.
    I'm stumped, I don't know how to debug this since I don't have source code for either the third-party app or for the JVM.
    Even some thoughts about what might cause the JVM to do this would be great. I've looked in depth at signals and signal handling but didn't find anything wrong there.
    Help!
    # An unexpected error has been detected by Java Runtime Environment:
    # SIGSEGV (0xb) at pc=0x00000000, pid=14312, tid=1319668656
    # Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode)
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x4a9a2400): JavaThread "AWT-EventQueue-0" [_thread_in_vm_trans, id=14327]
    siginfo:
    [error occurred during error reporting, step 90, id 0xb]
    Stack: [0x4ea38000,0x4ea89000), sp=0x4ea870dc, free space=316k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [libjvm.so+0x3ae327]
    V [libjvm.so+0x3aef34]
    C [libpthread.so.0+0xaf80]
    V [libjvm.so+0x3add75]
    V [libjvm.so+0x3ae327]
    V [libjvm.so+0x3079c0]
    V [libjvm.so+0x305278]
    C [libc.so.6+0x280d8]
    j java.awt.MediaTracker.statusID(IZZ)I+47
    j java.awt.MediaTracker.waitForID(IJ)Z+16
    j javax.swing.ImageIcon.loadImage(Ljava/awt/Image;)V+24
    j javax.swing.ImageIcon.<init>([B)V+82
    j sun.swing.ImageIconUIResource.<init>([B)V+2
    j sun.swing.SwingUtilities2$2.createValue(Ljavax/swing/UIDefaults;)Ljava/lang/Object;+69
    J javax.swing.UIDefaults.getFromHashtable(Ljava/lang/Object;)Ljava/lang/Object;
    J javax.swing.UIDefaults.get(Ljava/lang/Object;)Ljava/lang/Object;
    J javax.swing.MultiUIDefaults.get(Ljava/lang/Object;)Ljava/lang/Object;
    j javax.swing.UIDefaults.getIcon(Ljava/lang/Object;)Ljavax/swing/Icon;+2
    j javax.swing.UIManager.getIcon(Ljava/lang/Object;)Ljavax/swing/Icon;+4
    j javax.swing.plaf.basic.BasicFileChooserUI.installIcons(Ljavax/swing/JFileChooser;)V+48
    j javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(Ljavax/swing/JFileChooser;)V+2
    j javax.swing.plaf.basic.BasicFileChooserUI.installUI(Ljavax/swing/JComponent;)V+39
    j javax.swing.plaf.metal.MetalFileChooserUI.installUI(Ljavax/swing/JComponent;)V+2
    j javax.swing.JComponent.setUI(Ljavax/swing/plaf/ComponentUI;)V+135
    j javax.swing.JFileChooser.updateUI()V+40
    j javax.swing.JFileChooser.setup(Ljavax/swing/filechooser/FileSystemView;)V+18
    j javax.swing.JFileChooser.<init>(Ljava/io/File;Ljavax/swing/filechooser/FileSystemView;)V+133
    j javax.swing.JFileChooser.<init>()V+9
    j com.coventor.misc.FontPicker$2.actionPerformed(Ljava/awt/event/ActionEvent;)V+4
    j javax.swing.AbstractButton.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+84
    j javax.swing.AbstractButton$Handler.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
    j javax.swing.DefaultButtonModel.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+35
    j javax.swing.DefaultButtonModel.setPressed(Z)V+117
    j javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Ljava/awt/event/MouseEvent;)V+35
    j java.awt.Component.processMouseEvent(Ljava/awt/event/MouseEvent;)V+64
    j javax.swing.JComponent.processMouseEvent(Ljava/awt/event/MouseEvent;)V+23
    j java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V+81
    j java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V+18
    j java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+562
    j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+42
    j java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
    j java.awt.LightweightDispatcher.retargetMouseEvent(Ljava/awt/Component;ILjava/awt/event/MouseEvent;)V+320
    j java.awt.LightweightDispatcher.processMouseEvent(Ljava/awt/event/MouseEvent;)Z+139
    j java.awt.LightweightDispatcher.dispatchEvent(Ljava/awt/AWTEvent;)Z+50
    j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+12
    j java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V+19
    j java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
    j java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+46
    j java.awt.EventDispatchThread.pumpOneEventForFilters(I)Z+156
    j java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+30
    j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11
    j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
    j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
    j java.awt.EventDispatchThread.run()V+9
    v ~StubRoutines::call_stub
    V [libjvm.so+0x209a4d]
    V [libjvm.so+0x305bc8]
    V [libjvm.so+0x209360]
    V [libjvm.so+0x2093ed]
    V [libjvm.so+0x279605]
    V [libjvm.so+0x38076f]
    V [libjvm.so+0x306aa3]
    C [libpthread.so.0+0x4dd8]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j java.awt.MediaTracker.statusID(IZZ)I+47
    j java.awt.MediaTracker.waitForID(IJ)Z+16
    j javax.swing.ImageIcon.loadImage(Ljava/awt/Image;)V+24
    j javax.swing.ImageIcon.<init>([B)V+82
    j sun.swing.ImageIconUIResource.<init>([B)V+2
    j sun.swing.SwingUtilities2$2.createValue(Ljavax/swing/UIDefaults;)Ljava/lang/Object;+69
    J javax.swing.UIDefaults.getFromHashtable(Ljava/lang/Object;)Ljava/lang/Object;
    J javax.swing.UIDefaults.get(Ljava/lang/Object;)Ljava/lang/Object;
    J javax.swing.MultiUIDefaults.get(Ljava/lang/Object;)Ljava/lang/Object;
    j javax.swing.UIDefaults.getIcon(Ljava/lang/Object;)Ljavax/swing/Icon;+2
    j javax.swing.UIManager.getIcon(Ljava/lang/Object;)Ljavax/swing/Icon;+4
    j javax.swing.plaf.basic.BasicFileChooserUI.installIcons(Ljavax/swing/JFileChooser;)V+48
    j javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(Ljavax/swing/JFileChooser;)V+2
    j javax.swing.plaf.basic.BasicFileChooserUI.installUI(Ljavax/swing/JComponent;)V+39
    j javax.swing.plaf.metal.MetalFileChooserUI.installUI(Ljavax/swing/JComponent;)V+2
    j javax.swing.JComponent.setUI(Ljavax/swing/plaf/ComponentUI;)V+135
    j javax.swing.JFileChooser.updateUI()V+40
    j javax.swing.JFileChooser.setup(Ljavax/swing/filechooser/FileSystemView;)V+18
    j javax.swing.JFileChooser.<init>(Ljava/io/File;Ljavax/swing/filechooser/FileSystemView;)V+133
    j javax.swing.JFileChooser.<init>()V+9
    j com.coventor.misc.FontPicker$2.actionPerformed(Ljava/awt/event/ActionEvent;)V+4
    j javax.swing.AbstractButton.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+84
    j javax.swing.AbstractButton$Handler.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
    j javax.swing.DefaultButtonModel.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+35
    j javax.swing.DefaultButtonModel.setPressed(Z)V+117
    j javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Ljava/awt/event/MouseEvent;)V+35
    j java.awt.Component.processMouseEvent(Ljava/awt/event/MouseEvent;)V+64
    j javax.swing.JComponent.processMouseEvent(Ljava/awt/event/MouseEvent;)V+23
    j java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V+81
    j java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V+18
    j java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+562
    j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+42
    j java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
    j java.awt.LightweightDispatcher.retargetMouseEvent(Ljava/awt/Component;ILjava/awt/event/MouseEvent;)V+320
    j java.awt.LightweightDispatcher.processMouseEvent(Ljava/awt/event/MouseEvent;)Z+139
    j java.awt.LightweightDispatcher.dispatchEvent(Ljava/awt/AWTEvent;)Z+50
    j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+12
    j java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V+19
    j java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
    j java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+46
    j java.awt.EventDispatchThread.pumpOneEventForFilters(I)Z+156
    j java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+30
    j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11
    j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
    j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
    j java.awt.EventDispatchThread.run()V+9
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x4a954800 JavaThread "Image Fetcher 0" daemon [_thread_blocked, id=14331]
    0x4a9fd400 JavaThread "DestroyJavaVM" [_thread_blocked, id=14315]
    =>0x4a9a2400 JavaThread "AWT-EventQueue-0" [_thread_in_vm_trans, id=14327]
    0x4a99c000 JavaThread "AWT-Shutdown" [_thread_blocked, id=14326]
    0x4a97fc00 JavaThread "AWT-XAWT" daemon [_thread_blocked, id=14325]
    0x08292c00 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=14323]
    0x4a902000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=14321]
    0x4a900800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=14320]
    0x080bb400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=14319]
    0x080ab400 JavaThread "Finalizer" daemon [_thread_blocked, id=14318]
    0x080a7000 JavaThread "Reference Handler" daemon [_thread_blocked, id=14317]
    Other Threads:
    0x080a4000 VMThread [id=14316]
    0x4a90b800 WatcherThread [id=14322]
    VM state:synchronizing (normal execution)
    VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
    [0x08056b90/0x08056bb8] Safepoint_lock - owner thread: 0x080a4000
    [0x08056c10/0x08056c38] Threads_lock - owner thread: 0x080a4000
    Heap
    def new generation total 960K, used 348K [0x422e0000, 0x423e0000, 0x427c0000)
    eden space 896K, 31% used [0x422e0000, 0x423270d0, 0x423c0000)
    from space 64K, 100% used [0x423d0000, 0x423e0000, 0x423e0000)
    to space 64K, 0% used [0x423c0000, 0x423c0000, 0x423d0000)
    tenured generation total 4096K, used 950K [0x427c0000, 0x42bc0000, 0x462e0000)
    the space 4096K, 23% used [0x427c0000, 0x428adae0, 0x428adc00, 0x42bc0000)
    compacting perm gen total 12288K, used 9535K [0x462e0000, 0x46ee0000, 0x4a2e0000)
    the space 12288K, 77% used [0x462e0000, 0x46c2fe78, 0x46c30000, 0x46ee0000)
    No shared spaces configured.
    Dynamic libraries:
    06000000-06412000 r-xp 00000000 00:0b 457890057 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/client/libjvm.so
    06412000-0642b000 rwxp 00412000 00:0b 457890057 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/client/libjvm.so
    0642b000-0684a000 rwxp 00000000 00:00 0
    08048000-08052000 r-xp 00000000 00:0b 457826569 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/bin/java
    08052000-08053000 rwxp 00009000 00:0b 457826569 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/bin/java
    08053000-082d9000 rwxp 00000000 00:00 0
    40000000-40015000 r-xp 00000000 08:02 507907 /lib/ld-2.3.2.so
    40015000-40016000 rwxp 00015000 08:02 507907 /lib/ld-2.3.2.so
    40016000-40017000 rwxp 00000000 00:00 0
    40017000-40018000 ---p 00000000 00:00 0
    40018000-40019000 rwxp 00000000 00:00 0
    40019000-4001f000 r-xp 00000000 00:0b 457959177 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/native_threads/libhpi.so
    4001f000-40020000 rwxp 00006000 00:0b 457959177 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/native_threads/libhpi.so
    40020000-40028000 rwxs 00000000 08:02 1917749 /tmp/hsperfdata_ken/14312
    40028000-40029000 r-xp 00000000 00:0b 650339 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libnativelib.so
    40029000-4002a000 rwxp 00000000 00:0b 650339 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libnativelib.so
    4002a000-4002b000 r-xp 00000000 08:02 2064395 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2
    4002b000-4002c000 rwxp 00000000 08:02 2064395 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2
    4002c000-40039000 r-xp 00000000 08:02 2818055 /lib/tls/libpthread-0.60.so
    40039000-4003a000 rwxp 0000c000 08:02 2818055 /lib/tls/libpthread-0.60.so
    4003a000-4003c000 rwxp 00000000 00:00 0
    4003c000-40043000 r-xp 00000000 00:0b 457891593 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/jli/libjli.so
    40043000-40045000 rwxp 00006000 00:0b 457891593 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/jli/libjli.so
    40045000-40047000 r-xp 00000000 08:02 507920 /lib/libdl-2.3.2.so
    40047000-40048000 rwxp 00001000 08:02 507920 /lib/libdl-2.3.2.so
    40048000-4017b000 r-xp 00000000 08:02 2818050 /lib/tls/libc-2.3.2.so
    4017b000-4017e000 rwxp 00132000 08:02 2818050 /lib/tls/libc-2.3.2.so
    4017e000-40182000 rwxp 00000000 00:00 0
    40182000-401a3000 r-xp 00000000 08:02 2818053 /lib/tls/libm-2.3.2.so
    401a3000-401a4000 rwxp 00021000 08:02 2818053 /lib/tls/libm-2.3.2.so
    401a4000-401a7000 ---p 00000000 00:00 0
    401a7000-401f5000 rwxp 00003000 00:00 0
    401f5000-40200000 r-xp 00000000 00:0b 457957641 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libverify.so
    40200000-40201000 rwxp 0000b000 00:0b 457957641 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libverify.so
    40201000-40205000 r-xp 00000000 08:02 360496 /usr/X11R6/lib/libXtst.so.6.1
    40205000-40206000 rwxp 00004000 08:02 360496 /usr/X11R6/lib/libXtst.so.6.1
    40206000-40207000 rwxp 00000000 00:00 0
    4020a000-4021b000 r-xp 00000000 08:02 507924 /lib/libnsl-2.3.2.so
    4021b000-4021c000 rwxp 00011000 08:02 507924 /lib/libnsl-2.3.2.so
    4021c000-4021e000 rwxp 00000000 00:00 0
    4021e000-40241000 r-xp 00000000 00:0b 457913353 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libjava.so
    40241000-40243000 rwxp 00023000 00:0b 457913353 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libjava.so
    40243000-40252000 r-xp 00000000 00:0b 457957897 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libzip.so
    40252000-40254000 rwxp 0000e000 00:0b 457957897 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libzip.so
    40254000-4032c000 rwxp 00000000 00:00 0
    4032c000-42254000 rwxp 000d8000 00:00 0
    42254000-42258000 rwxp 00000000 00:00 0
    42258000-422d4000 rwxp 02004000 00:00 0
    422d4000-422db000 r-xp 00000000 08:02 360480 /usr/X11R6/lib/libXi.so.6.0
    422db000-422dc000 rwxp 00006000 08:02 360480 /usr/X11R6/lib/libXi.so.6.0
    422e0000-423e0000 rwxp 00000000 00:00 0
    423e0000-427c0000 rwxp 0218c000 00:00 0
    427c0000-42bc0000 rwxp 00000000 00:00 0
    42bc0000-462e0000 rwxp 0296c000 00:00 0
    462e0000-46ee0000 rwxp 00000000 00:00 0
    46ee0000-4a2e0000 rwxp 06c8c000 00:00 0
    4a2e0000-4a2e1000 rwxp 00000000 00:00 0
    4a2e1000-4a2e2000 rwxp 0a08d000 00:00 0
    4a2e2000-4a2e5000 rwxp 00000000 00:00 0
    4a2e5000-4a300000 rwxp 0a091000 00:00 0
    4a300000-4a306000 rwxp 00000000 00:00 0
    4a306000-4a320000 rwxp 0a0b2000 00:00 0
    4a320000-4a324000 rwxp 00000000 00:00 0
    4a324000-4a33f000 rwxp 00003000 00:00 0
    4a33f000-4a346000 rwxp 00000000 00:00 0
    4a346000-4a360000 rwxp 00025000 00:00 0
    4a360000-4a4db000 r-xs 02c75000 00:0b 458017033 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/rt.jar
    4a4db000-4a50b000 rwxp 00000000 00:00 0
    4a50b000-4a50c000 ---p 00030000 00:00 0
    4a50c000-4a58c000 rwxp 00031000 00:00 0
    4a58c000-4a58f000 ---p 000b1000 00:00 0
    4a58f000-4a5dd000 rwxp 000b4000 00:00 0
    4a5dd000-4a5e0000 ---p 00102000 00:00 0
    4a5e0000-4a62e000 rwxp 00105000 00:00 0
    4a62e000-4a82e000 r-xp 00000000 08:02 3342341 /usr/lib/locale/locale-archive
    4a82e000-4a831000 ---p 00000000 00:00 0
    4a831000-4a87f000 rwxp 00003000 00:00 0
    4a87f000-4a882000 ---p 00051000 00:00 0
    4a882000-4aa00000 rwxp 00054000 00:00 0
    4aa00000-4aa03000 ---p 00000000 00:00 0
    4aa03000-4aa51000 rwxp 00003000 00:00 0
    4aa51000-4aa52000 ---p 00051000 00:00 0
    4aa52000-4aad2000 rwxp 00052000 00:00 0
    4aad2000-4ab4d000 r-xp 00000000 00:0b 457897225 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libawt.so
    4ab4d000-4ab54000 rwxp 0007b000 00:0b 457897225 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libawt.so
    4ab54000-4ab78000 rwxp 00000000 00:00 0
    4ab78000-4ac3e000 r-xp 00000000 00:0b 457929481 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libmlib_image.so
    4ac3e000-4ac3f000 rwxp 000c5000 00:0b 457929481 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libmlib_image.so
    4ac3f000-4ac7d000 r-xp 00000000 00:0b 457961481 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/xawt/libmawt.so
    4ac7d000-4ac80000 rwxp 0003d000 00:0b 457961481 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/xawt/libmawt.so
    4ac80000-4ac93000 r-xp 00000000 00:0b 457941513 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libnet.so
    4ac93000-4ac94000 rwxp 00013000 00:0b 457941513 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libnet.so
    4ac95000-4aca2000 r-xp 00000000 08:02 360472 /usr/X11R6/lib/libXext.so.6.4
    4aca2000-4aca3000 rwxp 0000c000 08:02 360472 /usr/X11R6/lib/libXext.so.6.4
    4aca3000-4ad7f000 r-xp 00000000 08:02 360462 /usr/X11R6/lib/libX11.so.6.2
    4ad7f000-4ad82000 rwxp 000db000 08:02 360462 /usr/X11R6/lib/libX11.so.6.2
    4ad82000-4b47e000 r-xp 00000000 00:0b 458691848 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaABlend.so
    4b47e000-4b48b000 rwxp 006fb000 00:0b 458691848 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaABlend.so
    4b48b000-4b48d000 rwxp 00000000 00:00 0
    4b48d000-4b9da000 r-xp 00000000 00:0b 458693129 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaALops.so
    4b9da000-4b9e3000 rwxp 0054c000 00:0b 458693129 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaALops.so
    4b9e3000-4b9e6000 rwxp 00000000 00:00 0
    4b9e6000-4ba23000 r-xp 00000000 00:0b 458693385 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaAPart.so
    4ba23000-4ba25000 rwxp 0003c000 00:0b 458693385 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaAPart.so
    4ba25000-4be22000 r-xp 00000000 00:0b 458693641 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaASurf.so
    4be22000-4be28000 rwxp 003fc000 00:0b 458693641 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaASurf.so
    4be28000-4be29000 rwxp 00000000 00:00 0
    4be29000-4bfbb000 r-xp 00000000 00:0b 458694153 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaAVis.so
    4bfbb000-4bfc0000 rwxp 00192000 00:0b 458694153 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaAVis.so
    4bfc0000-4bfc1000 rwxp 00000000 00:00 0
    4bfc1000-4c033000 r-xp 00000000 00:0b 458694409 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaAWarp.so
    4c033000-4c035000 rwxp 00071000 00:0b 458694409 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaAWarp.so
    4c035000-4e20d000 r-xp 00000000 00:0b 458692104 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaACIS.so
    4e20d000-4e252000 rwxp 021d7000 00:0b 458692104 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaACIS.so
    4e252000-4e26b000 rwxp 00000000 00:00 0
    4e26b000-4e64b000 r-xp 00000000 00:0b 458694665 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaBase.so
    4e64b000-4e659000 rwxp 003e0000 00:0b 458694665 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaBase.so
    4e659000-4e65e000 rwxp 00000000 00:00 0
    4e65e000-4e66a000 r-xp 00000000 08:02 1228857 /usr/lib/libz.so.1.1.4
    4e66a000-4e66c000 rwxp 0000b000 08:02 1228857 /usr/lib/libz.so.1.1.4
    4e66c000-4e671000 r-xp 00000000 08:02 507918 /lib/libcrypt-2.3.2.so
    4e671000-4e672000 rwxp 00004000 08:02 507918 /lib/libcrypt-2.3.2.so
    4e672000-4e699000 rwxp 00000000 00:00 0
    4e699000-4e6e6000 r-xp 00000000 08:02 360494 /usr/X11R6/lib/libXt.so.6.0
    4e6e6000-4e6ea000 rwxp 0004c000 08:02 360494 /usr/X11R6/lib/libXt.so.6.0
    4e6ea000-4e793000 r-xp 00000000 08:02 1228905 /usr/lib/libstdc++.so.5.0.3
    4e793000-4e798000 rwxp 000a8000 08:02 1228905 /usr/lib/libstdc++.so.5.0.3
    4e798000-4e79d000 rwxp 00000000 00:00 0
    4e79d000-4e7a5000 r-xp 00000000 08:02 508037 /lib/libgcc_s-3.2.3-20040701.so.1
    4e7a5000-4e7a6000 rwxp 00007000 08:02 508037 /lib/libgcc_s-3.2.3-20040701.so.1
    4e7a6000-4e862000 r-xp 00000000 00:0b 458691592 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaAAsm.so
    4e862000-4e865000 rwxp 000bb000 00:0b 458691592 /mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing/libSpaAAsm.so
    4e865000-4e86c000 r-xp 00000000 08:02 360460 /usr/X11R6/lib/libSM.so.6.0
    4e86c000-4e86d000 rwxp 00007000 08:02 360460 /usr/X11R6/lib/libSM.so.6.0
    4e86d000-4e881000 r-xp 00000000 08:02 360456 /usr/X11R6/lib/libICE.so.6.3
    4e881000-4e882000 rwxp 00013000 08:02 360456 /usr/X11R6/lib/libICE.so.6.3
    4e882000-4e884000 rwxp 00000000 00:00 0
    4e884000-4e902000 r-xp 00000000 00:0b 457903625 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libfontmanager.so
    4e902000-4e90c000 rwxp 0007e000 00:0b 457903625 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libfontmanager.so
    4e90c000-4e911000 rwxp 00000000 00:00 0
    4e911000-4e914000 ---p 00005000 00:00 0
    4e914000-4e962000 rwxp 00008000 00:00 0
    4e962000-4e969000 r-xp 00000000 00:0b 457941769 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libnio.so
    4e969000-4e96a000 rwxp 00006000 00:0b 457941769 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libnio.so
    4e96a000-4e970000 r-xs 00000000 08:02 2441410 /usr/lib/gconv/gconv-modules.cache
    4e970000-4e977000 r-xs 00106000 00:0b 458016777 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/resources.jar
    4e985000-4e98d000 r-xp 00000000 08:02 360470 /usr/X11R6/lib/libXcursor.so.1.0
    4e98d000-4e98e000 rwxp 00007000 08:02 360470 /usr/X11R6/lib/libXcursor.so.1.0
    4e98e000-4e995000 r-xp 00000000 08:02 360492 /usr/X11R6/lib/libXrender.so.1.2.2
    4e995000-4e996000 rwxp 00006000 08:02 360492 /usr/X11R6/lib/libXrender.so.1.2.2
    4e996000-4e999000 ---p 00000000 00:00 0
    4e999000-4e9e7000 rwxp 00003000 00:00 0
    4e9e7000-4e9ea000 ---p 00051000 00:00 0
    4e9ea000-4ea38000 rwxp 00054000 00:00 0
    4ea38000-4ea3b000 ---p 000a2000 00:00 0
    4ea3b000-4ea89000 rwxp 000a5000 00:00 0
    4ea89000-4ea8c000 ---p 000f3000 00:00 0
    4ea8c000-4eb23000 rwxp 000f6000 00:00 0
    4eb23000-4eb77000 r-xp 00000000 00:0b 457897481 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libcmm.so
    4eb77000-4eb7a000 rwxp 00054000 00:0b 457897481 /mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/libcmm.so
    4eb7a000-4eb96000 r-xp 00000000 08:02 2064760 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
    4eb96000-4eb98000 rwxp 0001c000 08:02 2064760 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
    4ec00000-4ec99000 rwxp 00086000 00:00 0
    4ec99000-4ed00000 ---p 00000000 00:00 0
    bfff7000-c0000000 rwxp ffff9000 00:00 0
    VM Arguments:
    java_command: com.coventor.misc.FontPicker
    Launcher Type: SUN_STANDARD
    Environment Variables:
    PATH=/mnt/tools/intel/fc/9.0/bin:/mnt/users/ken/builds/cware/trunk/memcad/bin:/mnt/users/ken/builds/cware/trunk/memcad/bin/linux:/mnt/users/ken/builds/cware/trunk/memcad/bin/linux:/mnt/builds_linux/trunk/current/debug/memcad/bin:/mnt/builds_linux/trunk/current/debug/memcad/bin/linux:/mnt/users/ken/builds/cware/trunk/memcad/src/test/tools/scripts:/mnt/users/ken/builds/cware/trunk/memcad/src/test/tools/linux:/mnt/builds_linux/trunk/current/debug/memcad/src/test/tools/scripts:/mnt/builds_linux/trunk/current/debug/memcad/src/test/tools/linux:/mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/bin:.:/mnt/users/ken/bin:/mnt/users/ken/scripts:/bin:/usr/bin:/usr/sbin:/usr/lang:/usr/ucb:/usr/local/bin:/etc:/usr/dt/bin:/usr/kerberos/bin:/usr/X11R6/bin:/usr/X11R6/bin:/opt/ken/WindRiver/SNiFF+-4.0.2/bin:/mnt/users/ken/local/graphviz/graphviz-1.12/dotneato:/mnt/tools/bin
    LD_LIBRARY_PATH=/mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/client:/mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386:/mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/../lib/i386:/mnt/tools/intel/fc/9.0/lib:/mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing:/mnt/users/ken/builds/cware/trunk/memcad/lib/linux/mech:/mnt/users/ken/builds/cware/trunk/memcad/lib/linux/missing:/mnt/builds_linux/trunk/current/debug/memcad/lib/linux/missing:/mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386:/mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/client:/mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/native_threads:/mnt/users/ken/builds/cware/trunk/memcad/runtime/jre/1.6.0_01/linux/lib/i386/xawt
    SHELL=/usr/local/bin/tcsh
    DISPLAY=wheelie.memcad.com:0.0
    HOSTTYPE=i386-linux
    OSTYPE=linux
    ARCH=linux
    MACHTYPE=i386
    Signal Handlers:
    SIGSEGV: [libjvm.so+0x3aeee0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000000, flags was changed from 0x10000004, consider using jsig library
    SIGBUS: [libjvm.so+0x3aeee0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000000, flags was changed from 0x10000004, consider using jsig library
    SIGFPE: [libjvm.so+0x305260], sa_mask[0]=0x00000080, sa_flags=0x10000000, flags was changed from 0x10000004, consider using jsig library
    SIGPIPE: [libjvm.so+0x305260], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGILL: [libjvm.so+0x305260], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGUSR2: [libjvm.so+0x307270], sa_mask[0]=0x00000000, sa_flags=0x10000004
    SIGHUP: [libjvm.so+0x306c90], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGINT: [libjvm.so+0x306c90], sa_mask[0]=0x00000002, sa_flags=0x10000000
    SIGQUIT: [libjvm.so+0x306c90], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGTERM: [libjvm.so+0x306c90], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGUSR2: [libjvm.so+0x307270], sa_mask[0]=0x00000000, sa_flags=0x10000004
    --------------- S Y S T E M ---------------
    OS:Red Hat Enterprise Linux WS release 3 (Taroon Update 8)
    uname:Linux 2.4.21-32.ELsmp #1 SMP Fri Apr 15 21:17:59 EDT 2005 i686
    libc:glibc 2.3.2 NPTL 0.60
    rlimit: STACK infinity, CORE 0k, NPROC 7168, NOFILE 1024, AS infinity
    load average:0.06 0.06 0.02
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 4029580k(1730940k free), swap 2096472k(2096472k free)
    vm_info: Java HotSpot(TM) Client VM (1.6.0_01-b06) for linux-x86, built on Mar 14 2007 01:00:53 by "java_re" with gcc 3.2.1-7a (J2SE release)

    Hi there,
    Since you said you use JNI, did you try to use the -Xcheck:jni parameter? It will perform some extra consistency checks when calling JNI, at the expense of maybe some loss in JNI performance. This might catch any problems that might occur at the JNI level. Of course, if the third-party library has bugs and corrupts the VM heap, there's no much we can do.
    Regards,
    Tony, HS GC Group

  • Where does UIManager Defaults created?

    Hi, I'm tring to translate JOptionPane, JColorChooser and so on.
    In the forums I saw that the default localization for the components can be found using UIManager. For example the text for the ok button in JOptionPane
    can be found using UIManager.get("OptionPane.okButtonText").
    My problem is that I can't find where the defaults are stored. I Know that in the past there was a resource bundle called "basic.properties", But now I can't find It (I'm using J2SE 5.0).
    Does anyone know where this defaults are stored?
    Thanks, Hanoch

    My problem is that I can't find where the defaultsare stored.
    Why is this a problem. Just use:
    UIDefaults defaults =
    UIManager.getLookAndFeelDefaults();
    and this iterate through all the entries. Or you
    could use the following fancy program:
    http://www.discoverteenergy.com/files/ShowUIDefaults.java
    This in not exactly what I wanted, eventhough the program is very good.
    What I need to find is where the default values for the texts are allocated.
    For example where can I find:
    UIManager.put("OptionPane.okButtonText", "OK");
    UIManager.put("OptionPane.yesButtonText", "YES");
    And so on...

  • Using java on windows vista 64 bit

    Hi, I am using a program for the univercity which use java, and it work fime on 32 bit operation systems such as ubuntu linux and XP/vista... but when I try to run it on the vista 64 bit on my AMD Athlon 64 bit I get the msg:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3184
    at sun.awt.shell.Win32ShellFolder2.getFileChooserIcon(Unknown Source)
    at sun.awt.shell.Win32ShellFolderManager2.get(Unknown Source)
    at sun.awt.shell.ShellFolder.get(Unknown Source)
    at com.sun.java.swing.plaf.windows.WindowsLookAndFeel$LazyWindowsIcon.cr
    eateValue(Unknown Source)
    at javax.swing.UIDefaults.getFromHashtable(Unknown Source)
    at javax.swing.UIDefaults.get(Unknown Source)
    at javax.swing.MultiUIDefaults.get(Unknown Source)
    at javax.swing.UIDefaults.getIcon(Unknown Source)
    at javax.swing.UIManager.getIcon(Unknown Source)
    at javax.swing.plaf.basic.BasicFileChooserUI.installIcons(Unknown Source)
    at javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(Unknown Source)
    at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
    at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(Unknown Source)
    at javax.swing.JComponent.setUI(Unknown Source)
    at javax.swing.JFileChooser.updateUI(Unknown Source)
    at javax.swing.JFileChooser.setup(Unknown Source)
    at javax.swing.JFileChooser.<init>(Unknown Source)
    at javax.swing.JFileChooser.<init>(Unknown Source)
    at SimulatorsGUI.ROMComponent.<init>(Unknown Source)
    at SimulatorsGUI.CPUEmulatorComponent.<init>(Unknown Source)
    at CPUEmulatorMain.main(Unknown Source)
    I tryed to istall the 64 bit java but could not since when I tryed it said that my CPU does not support this program..
    Any solution?
    Thanks
    Amir

    Yes.
    Mylenium

  • Look & Feel of custom JOptionPanes

    How do you get the look and feel of custom built JOptionPane's to match that of the parent frame? Although the parent frame in my case is the java look and feel, the JOptionPane is showing up with a windows look and feel. I couldn't find any JOptionPane methods that even allowed one to reset the look and feel. Any suggestions would be appreciated. Thanks!

    You can set JOptionPane L&F parameters with:
    UIManager.put("OptionPane.background", Color.black);
    here is a list of all parameters for OptionPane, i hope helps you:
    OptionPane.errorDialog.titlePane.shadow-->javax.swing.plaf.ColorUIResource[r=204,g=102,b=102]
    OptionPane.warningDialog.titlePane.background-->javax.swing.plaf.ColorUIResource[r=255,g=204,b=153]
    OptionPane.errorDialog.titlePane.background-->javax.swing.plaf.ColorUIResource[r=255,g=153,b=153]
    OptionPane.buttonAreaBorder-->javax.swing.plaf.BorderUIResource$EmptyBorderUIResource@1815859
    OptionPane.warningDialog.titlePane.foreground-->javax.swing.plaf.ColorUIResource[r=102,g=51,b=0]
    OptionPane.questionDialog.border.background-->javax.swing.plaf.ColorUIResource[r=51,g=102,b=51]
    OptionPane.windowBindings-->[Ljava.lang.Object;@50d89c
    OptionPane.questionSound-->sounds/OptionPaneQuestion.wav
    OptionPane.errorSound-->sounds/OptionPaneError.wav
    OptionPane.warningSound-->sounds/OptionPaneWarning.wav
    OptionPane.errorDialog.titlePane.foreground-->javax.swing.plaf.ColorUIResource[r=51,g=0,b=0]
    OptionPane.buttonClickThreshhold-->500
    OptionPane.questionDialog.titlePane.background-->javax.swing.plaf.ColorUIResource[r=153,g=204,b=153]
    OptionPane.errorIcon-->javax.swing.plaf.IconUIResource@15b0afd
    OptionPane.warningDialog.titlePane.shadow-->javax.swing.plaf.ColorUIResource[r=204,g=153,b=102]
    OptionPane.font-->javax.swing.plaf.FontUIResource[family=Dialog,name=Dialog,style=plain,size=12]
    OptionPane.messageForeground-->javax.swing.plaf.ColorUIResource[r=0,g=0,b=0]
    OptionPane.informationSound-->sounds/OptionPaneInformation.wav
    OptionPane.questionDialog.titlePane.foreground-->javax.swing.plaf.ColorUIResource[r=0,g=51,b=0]
    OptionPane.informationIcon-->javax.swing.plaf.IconUIResource@1dfc547
    OptionPane.foreground-->javax.swing.plaf.ColorUIResource[r=0,g=0,b=0]
    OptionPane.border-->javax.swing.plaf.BorderUIResource$EmptyBorderUIResource@10f6d3
    OptionPane.messageAreaBorder-->javax.swing.plaf.BorderUIResource$EmptyBorderUIResource@cfec48
    OptionPane.background-->javax.swing.plaf.ColorUIResource[r=204,g=204,b=204]
    OptionPane.questionIcon-->javax.swing.plaf.IconUIResource@2a15cd
    OptionPane.minimumSize-->javax.swing.plaf.DimensionUIResource[width=262,height=90]
    OptionPane.questionDialog.titlePane.shadow-->javax.swing.plaf.ColorUIResource[r=102,g=153,b=102]
    OptionPane.errorDialog.border.background-->javax.swing.plaf.ColorUIResource[r=153,g=51,b=51]
    OptionPane.warningIcon-->javax.swing.plaf.IconUIResource@12d15a9
    OptionPane.warningDialog.border.background-->javax.swing.plaf.ColorUIResource[r=153,g=102,b=51]

  • Accessing File/Folder icons for current Look and Feel

    Hi,
    I'm looking to get the Icon for files and folders that the current UIManager uses for some work I'm doing. Please could you help.
    I'm getting strange results from the method I'm using, which is to create a temporary file and do: Icon i = FileSystemView.getFileSystemView().getSystemIcon(tempFile);
    I don't like the idea of having to create a temporary file to do this - isn't there another way to do it? - for instance asking "get default file icon"/"get default folder icon".
    I could download a jpg image of the file/folder icons, but this is static - and I want my method to get the icons used for the current look and feel I'm using.
    There must be a simple way to do this right? I mean, java uses a method to get the icons for the current look and feel.. Oh.. Please help!
    - Edd.

    Try these:
    UIManager.getIcon("FileView.directoryIcon");
    UIManager.getIcon("FileView.fileIcon");Leif Samuelsson
    Java Swing Team
    Sun Microsystems, Inc.

  • Bug: IconUIResource doesn't paint an animated ImageIcon

    I was recently playing with Icons and found that javax.swing.plaf.IconUIResource doesn't paint an ImageIcon that contains an animated GIF. Found the reason in these bug fixes.
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4215118]
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4215118]
    From that, I could arrive at a workaround: extend ImageIcon to implement the UIResource marker interface and use this class instead of wrapping an ImageIcon in a IconUIResource. Interestingly, NetBeans autocomplete revealed the existance of sun.swing.ImageIconUIResource which I determined to be a direct subclass of ImageIcon, with two constructors that take an Image and byte[] respectively.
    Test SSCCE: import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JOptionPane;
    import javax.swing.UIManager;
    import javax.swing.plaf.IconUIResource;
    import javax.swing.plaf.UIResource;
    public class IconUIResourceBug {
      public static void main(String[] args) {
        try {
          URL imageURL = new URL("http://www.smiley-faces.org/smiley-faces/smiley-face-rabbit.gif");
          InputStream is = imageURL.openStream();
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          int n;
          byte[] data = new byte[1024];
          while ((n = is.read(data, 0, data.length)) != -1) {
            baos.write(data, 0, n);
          baos.flush();
          byte[] bytes = baos.toByteArray();
          ImageIcon imageIcon = new ImageIcon(bytes);
          Icon icon = new IconUIResource(imageIcon);
          UIManager.put("OptionPane.errorIcon", icon);
          JOptionPane.showMessageDialog(null, "javax.swing.plaf.IconUIResource", "Icon not shown",
                  JOptionPane.ERROR_MESSAGE);
          icon = new ImageIconUIResource(bytes);
          UIManager.put("OptionPane.errorIcon", icon);
          JOptionPane.showMessageDialog(null, "ImageIconUIResource", "Icon shown",
                  JOptionPane.ERROR_MESSAGE);
          icon = new sun.swing.ImageIconUIResource(bytes);
          UIManager.put("OptionPane.errorIcon", icon);
          JOptionPane.showMessageDialog(null, "sun.swing.ImageIconUIResource", "Icon shown",
                  JOptionPane.ERROR_MESSAGE);
        } catch (MalformedURLException ex) {
          ex.printStackTrace();
        } catch (IOException ex) {
          ex.printStackTrace();
    class ImageIconUIResource extends ImageIcon implements UIResource {
      public ImageIconUIResource(byte[] bytes) {
        super(bytes);
    }I can't see any alternative fix for the one carried out in response to the quoted bug reports, so have held off on making a bug report. Any ideas?
    Thanks for reading, Darryl
    I'm also posting this to JavaRanch for wider discussion, and shall post the link here as soon as possible. I'll also keep both threads updated with all significant suggestions received.
    edit [http://www.coderanch.com/t/498351/GUI/java/Bug-IconUIResource-doesn-paint-animated]
    Edited by: DarrylBurke

    Animated gif is working fine for me.
    You can check the delay time between the images in the gif, to see that it's not too short.
    Here's a simple example:import java.net.URL;
    import javax.imageio.ImageIO;
    import javax.imageio.stream.ImageInputStream;
    import javax.swing.ImageIcon;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import com.sun.imageio.plugins.gif.GIFImageMetadata;
    import com.sun.imageio.plugins.gif.GIFImageReader;
    public class AnimatedGifTest {
        public static void main(String[] args) {
            try {
                JFrame frame = new JFrame();
                frame.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE);
                URL url = new URL("http://www.gifanimations.com/action/SaveImage?path=/Image/Animations/Cartoons/~TS1176984655857/Bart_Simpson_2.gif");
                frame.add(new JLabel(new ImageIcon(url)));
                frame.pack();
                frame.setVisible(true);
                // Read the delay time for the first frame in the animated gif
                GIFImageReader reader = (GIFImageReader) ImageIO.getImageReadersByFormatName("GIF").next();
                ImageInputStream iis = ImageIO.createImageInputStream(url.openStream());
                reader.setInput(iis);
                GIFImageMetadata md = (GIFImageMetadata) reader.getImageMetadata(0);           
                System.out.println("Time Delay = " + md.delayTime);
                reader.dispose();
                iis.close();
            } catch (Exception e) {e.printStackTrace();}
    }

Maybe you are looking for