/*
* GUI.java
*
* Created on September 29, 2007, 9:37 PM
*/
package nasg;
import java.io.*;
import java.lang.reflect.Method;
import java.util.Arrays;
import javax.swing.JOptionPane;
import java.util.HashMap;
import java.util.Map;
/**
*
* @author Victor
*/
public class GUI{
/** Creates new form GUI */
public GUI() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
jLabel1 =
new javax.
swing.
JLabel();
jButton1 =
new javax.
swing.
JButton();
setTitle("Neo's Admin Script Generator 0.5");
setCursor
(new java.
awt.
Cursor(java.
awt.
Cursor.
DEFAULT_CURSOR));
setLocationByPlatform(true);
setResizable(false);
public void keyPressed
(java.
awt.
event.
KeyEvent evt
) { formKeyPressed(evt);
}
});
getAccessibleContext().setAccessibleName("nasg");
jComboBox1.
setModel(new javax.
swing.
DefaultComboBoxModel(new String[]
{ "r",
"m",
"m4m",
"m4a1auto",
"ma",
"ar",
"g",
"at4",
"s",
"s82",
"s24",
"spr",
"m9",
"b",
"sf",
"ak",
"ak74su",
"gp",
"rpg",
"rpk",
"svd",
"mos",
"v",
"d",
"pso",
"bdm" }));
public void actionPerformed
(java.
awt.
event.
ActionEvent evt
) { jComboBox1ActionPerformed(evt);
}
});
jTextArea1.setColumns(20);
jTextArea1.setLineWrap(true);
jTextArea1.setRows(5);
jTextArea1.setText("Enter Admin Message");
jTextArea1.setToolTipText("You can enter your administrator's message here");
jTextArea1.setWrapStyleWord(true);
jScrollPane1.setViewportView(jTextArea1);
jLabel1.setText("Weapon Class");
jButton1.setText("Compile!");
public void actionPerformed
(java.
awt.
event.
ActionEvent evt
) { jButton1ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addGap(73, 73, 73)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jButton1)))
.addGroup(layout.createSequentialGroup()
.
addContainerGap(34,
Short.
MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(23, 23, 23)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1))
.addGap(23, 23, 23)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.
addPreferredGap(javax.
swing.
LayoutStyle.
ComponentPlacement.
RELATED,
31,
Short.
MAX_VALUE) .addComponent(jButton1)
.addContainerGap())
);
pack();
}// </editor-fold>
private void formKeyPressed
(java.
awt.
event.
KeyEvent evt
) { // TODO add your handling code here:
}
private void jComboBox1ActionPerformed
(java.
awt.
event.
ActionEvent evt
) { public void actionPerformed
(java.
awt.
event.
ActionEvent evt
) { jComboBox1ActionPerformed(evt);
}
private void jButton1ActionPerformed
(java.
awt.
event.
ActionEvent evt
) {
try {
for(int number = 1; number <= 50; number++) {
new PrintStream(fout
).
println("admin forceclass " + cmdType
);
}
fout.close();
System.
err.
println("Unable to write to file");
}
}
/**
* @param args the command line arguments
*/
public static void main
(String args[]
) { public void run() {
new GUI().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.
swing.
JButton jButton1;
private javax.
swing.
JLabel jLabel1;
// End of variables declaration