package match.bonus.calculator; import java.util.Timer; import java.util.TimerTask; import javax.swing.*; import java.awt.*; import javax.swing.JTextArea; import java.lang.Double; /* @author Parad0xs */ public class exp extends javax.swing.JApplet { double gamelength; /** Initializes the applet exp */ public void init() { try { java.awt.EventQueue.invokeAndWait( new Runnable() { public void run() { initComponents(); } }); } catch (Exception ex) { ex.printStackTrace(); } } /** This method is called from within the init() method to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { JScrollPane jScrollPane1 = new javax.swing.JScrollPane(); JList jList1 = new javax.swing.JList(); JScrollPane jScrollPane3 = new javax.swing.JScrollPane(); JTextArea jTextArea2 = new javax.swing.JTextArea(); JLabel jLabel1 = new javax.swing.JLabel(); double winnerscale1 = 1; int index= jList1.getSelectedIndex(); double spm = ((((61 % index )+1)/2)+3); boolean val ; double playerscore1 = ( (winnerscale1 * ((gamelength/60) * spm))*(1) ); Double ps1 = playerscore1 ; String str = ps1.toString(); jTextArea2 = new JTextArea(100,100); jTextArea2.setText(str); addPropertyChangeListener( new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { formPropertyChange(evt); } }); jList1.setModel( new javax.swing.AbstractListModel() { String[] strings = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50" }; public int getSize() { return strings.length; } public Object getElementAt(int i) { return strings[i]; } }); jList1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); jScrollPane1.setViewportView(jList1); jTextArea2.setColumns(20); jTextArea2.setRows(5); jScrollPane3.setViewportView(jTextArea2); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap(88, Short.MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(56, 56, 56) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(113, 113, 113) .addComponent(jLabel1))) .addGap(57, 57, 57)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addGap(119, 119, 119) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1) .addGap(100, 100, 100))) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }// </editor-fold> @SuppressWarnings("FieldNameHidesFieldInSuperclass") double On = 1 ; private void formPropertyChange(java.beans.PropertyChangeEvent evt) { // TODO add your handling code here: } // Variables declaration - do not modify // End of variables declaration class GCTask extends TimerTask { public void run() { ++gamelength ; System.gc(); } } class timer { public void main(String[] args) { Timer timer = new Timer(); GCTask task = new GCTask(); timer.schedule(task, 1000, 1000); int counter = 1; while (true) { try { Thread.sleep(500); } catch (InterruptedException e) { } } } } }