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.

}<br />

}<br />

UIDefaults uiDefaults = UIManager.getDefaults();<br />

Enumeration en = uiDefaults.keys();<br />

String temp = "";<br />

Vector v = new Vector();<br />

while(en.hasMoreElements())<br />

{<br />

Object key = en.nextElement();<br />

Object value = uiDefaults.get(key);<br />

if(value != null)<br />

{<br />

if(value.toString().indexOf("ColorUIResource") != -1)<br />

{<br />

temp = "\", new ColorUIResource(0,0,0),";<br />

}<br />

else if(value.toString().indexOf("FontUIResource") != -1)<br />

{<br />

temp = "\", font1,";<br />

}<br />

}<br />

}<br />

else<br />

temp = "\", " + value.toString();<br />

v.add("//\"" + key.toString() + temp);<br />

Object[] thearray = v.toArray();<br />

Arrays.sort(thearray, new Comparator()<br />

{<br />

public int compare(Object o1, Object o2)<br />

{<br />

return(((String) o1).toLowerCase().<br />

compareTo(((String) o2).toLowerCase()));<br />

}<br />

});<br />

10.1.4.d DepositPanel<br />

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

import javax.swing.*;<br />

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

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

import java.awt.BorderLayout;<br />

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

public class DepositPanel extends JPanel<br />

{<br />

private MainFrame frame;<br />

private final String informationtext = "Please enter the number <strong>of</strong> coins you wish to<br />

deposit.";<br />

private final String[] labels =<br />

{"Amount ", "Login name ", " Password "};<br />

private final String CESLabel = "Currency server information:";<br />

private FormPanel logonInformationPanel;<br />

private AmountPanel amountPanel;<br />

private JTextArea informationTextArea;<br />

private Class className;<br />

protected DepositPanel(MainFrame frame)<br />

{<br />

this.frame = frame;<br />

235

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

Saved successfully!

Ooh no, something went wrong!