NotifyOSD-Like Conky Setup

Try A Beautiful, NotifyOSD-Like Conky Setup

 

Conky NotifyOSD

“notifyOSD Conky” is a simple Conky setup created by BigRZA that displays the CPU usage / temperature, RAM and HDD usage as well as the network traffic.

To use it, download the configuration from DeviantArt, extract the downloaded archive and place the configuration files in your home folder (the archive contains hidden files so press CTRL + H to see them).

Swing: JOptionPane Can Hold More Than Text

public static void showQuickErrorDialog(JFrame parent, IOException e) {
                // create and configure a text area - fill it with exception text.
                final JTextArea textArea = new JTextArea();
                textArea.setFont(new Font("Sans-Serif", Font.PLAIN, 10));
                textArea.setEditable(false);
                StringWriter writer = new StringWriter();
                e.printStackTrace(new PrintWriter(writer));
                textArea.setText(writer.toString());
                
                // stuff it in a scrollpane with a controlled size.
                JScrollPane scrollPane = new JScrollPane(textArea);                
                scrollPane.setPreferredSize(new Dimension(350, 150));
                
                // pass the scrollpane to the joptionpane.                                
                JOptionPane.showMessageDialog(parent, scrollPane, "An Error Has Occurred", JOptionPane.ERROR_MESSAGE);
}