29.07.2013 Views

Master of Science thesis Fighting Spam

Master of Science thesis Fighting Spam

Master of Science thesis Fighting Spam

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

frame.showMessage(mails.length+" coin(s) collected succesfully.<br />

The Safe status can be seen below. \n\n"+frame.getSafeStatus());<br />

}<br />

catch(Exception ex)<br />

{<br />

Debugger.debug(getClass(),1,"The coin could not be<br />

collected.",ex);<br />

frame.showError("The coin could not be collected.");<br />

}<br />

}<br />

}<br />

}<br />

private class selectListener implements ListSelectionListener<br />

{<br />

public void valueChanged(ListSelectionEvent evt)<br />

{<br />

if(evt.getValueIsAdjusting())<br />

return;<br />

if(((MailInformation)list.getSelectedValue()) != null)<br />

mailInformationTextArea.setText(((MailInformation)list.getSelectedValue()).showContents()<br />

);<br />

}<br />

}<br />

}<br />

10.1.4.m SplashScreen<br />

package <strong>Spam</strong>Cash.Client.GUI;<br />

import javax.swing.*;<br />

import java.awt.*;<br />

import java.awt.event.*;<br />

import java.util.*;<br />

import <strong>Spam</strong>Cash.Utilities.Config;<br />

public class SplashScreen extends JWindow<br />

{<br />

private ImageIcon splashImage;<br />

private JLabel imageLabel;<br />

public SplashScreen()<br />

{<br />

splashImage = new ImageIcon(Toolkit.getDefaultToolkit().getImage(Config.imagedir<br />

+<br />

System.getProperty("file.separator")<br />

+<br />

"splash.gif"));<br />

}<br />

setSize(new Dimension(450,118));<br />

imageLabel = new JLabel(splashImage);<br />

getContentPane().add(imageLabel);<br />

center();<br />

setVisible(true);<br />

try<br />

{<br />

Thread.sleep(100);<br />

}<br />

catch(InterruptedException ex)<br />

{<br />

}<br />

//Centers the window on the screen<br />

private void center()<br />

{<br />

258

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!